Closed
Description
Code:
#![feature(associated_consts)]
trait Tr {
const C: Self;
}
fn main() {
let a: u8 = Tr::C;
}
Output:
<anon>:4:5: 4:19 error: internal compiler error: Encountered error `Unimplemented` when trying to select an implementation for constant trait item reference.
<anon>:4 const C: Self;
^~~~~~~~~~~~~~
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
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', ../src/libsyntax/diagnostic.rs:176
Reproduces on nightly.