Skip to content

internal compiler error: unrecognized builtin nonterminal elem #21443

Closed
@Kroisse

Description

@Kroisse

Example:

macro_rules! weird {
    ($a:elem, $b:expr) => {}
}

fn main() {
    weird!(a, b);
}

Compiler message:

error: internal compiler error: unrecognized builtin nonterminal elem
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:185

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions