Closed
Description
This short snippet crashes the nightly compiler:
enum Foo {
Bar(usize),
}
fn main() {
let i = Foo::Bar;
assert_eq!(Foo::Bar, i);
}
Crashes with:
error: internal compiler error: src/librustc_typeck/check/mod.rs:825: can't type-check body of DefId(0/1:10 ~ lib[317d]::Foo[0]::Bar[0]::{{constructor}}[0])
--> src/lib.rs:2:3
|
2 | Bar(usize),
| ^^^^^^^^^^
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:570:9
rustc 1.35.0-nightly (70f1309 2019-04-16) running on x86_64-apple-darwin
Seems to work on stable on the playground (don't have stable locally).