Skip to content

rustc ICE with typoed path to enum constructor in alt #1699

Description

@jwise
fn main() {
  alt core::option::none {
    core::option::none() { }
    core::optn::some() { }
  }
}

Results in a crash (after a perfectly reasonable error message):

joshua@escape:~/rust/rlambda$ RUST_LOG=rustc=0,::rt::backtrace rustc smash.rs
smash.rs:4:4: 4:20 error: unresolved modulename: optn
smash.rs:4     core::optn::some() { }
               ^~~~~~~~~~~~~~~~
rust: upcall fail 'option none', src/libcore/option.rs:34
0   librustrt.dylib                     0x0000000103235a19 __morestack + 9
error: internal compiler error unexpected failure
note: The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: upcall fail 'explicit failure', src/comp/driver/rustc.rs:176
0   librustrt.dylib                     0x0000000103235a19 __morestack + 9
rust: domain main @0x7ff23081a000 root task failed

This was tested with rustc 0.1. Building from HEAD on nyus now to try to get a more helpful backtrace and to verify that it hasn't since been fixed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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