Skip to content

ICE when macro expansion has free syntactic variable reference #4773

@pnkfelix

Description

@pnkfelix
% rustc --version
rustc 0.6 (77ee858 2013-02-02 11:54:29 +0100)
host: x86_64-apple-darwin

% cat bug.rs
pub fn l() {
    macro_rules! m( ($inp:expr, ) => ( $id ); );
    m!(line,)

% RUST_LOG=rustc=1,::rt::backtrace rustc bug.rs
rust: task failed at 'Key not found in table: {repr: 43}', <core-macros>:15
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further 
details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', <core-macros>:15
rust: domain main @0x7fc393818a10 root task failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-syntaxextArea: Syntax extensionsI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions