Skip to content

Poor error while expanding macro_rules with bad match #5911

Closed
@ScatteredRay

Description

@ScatteredRay

With this block of code:

macro_rules! object {
  ($foo:ident) => (
    match $bar {
    }
  )
}

object!(baz)

I get the error

rust: task failed at 'No entry found for key: &{repr: 41}', /Users/indy/dev/guava/dep/rust-0.6/src/libcore/hashmap.rs:521
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', /Users/indy/dev/guava/dep/rust-0.6/src/librustc/rustc.rc:357
rust: domain main @0x7fbe4100c210 root task failed`

This error should be improved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions