Closed
Description
#![feature(associated_consts)]
trait Foo {
const X: u8 = 42;
fn test();
}
enum Bar {
X
}
impl Foo for Bar {
fn test() {
println!("{}", Self::X);
}
}
fn main() {
Bar::X::test();
}
rustc 1.16.0-nightly (7e38a89a7 2017-01-06)
error: internal compiler error: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_typeck/astconv.rs:1516: unexpected definition: Variant(DefId { krate: CrateNum(0), node: DefIndex(8) => rust_out/4089d7c8b778d88cec885baf7b69e6df-exe::Bar[0]::X[0] })
�(B�[m--> <anon>:19:5�(B�[m
�(B�[m|
19 �(B�[m| Bar::X::test();�(B�[m
�(B�[m| �(B�[m^^^^^^^^^^^^
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'Box<Any>', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_errors/lib.rs:382
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Metadata
Metadata
Assignees
Labels
No labels