Closed
Description
trait VecN {
const DIM: usize;
}
trait Mat {
type Row: VecN;
}
fn m<M: Mat>() {
let x = M::Row::DIM;
}
fn main() {
}
(Playpen) fails on current nightly with
Compiling playground v0.0.1 (file:///playground)
error: internal compiler error: /checkout/src/librustc_const_eval/eval.rs:552: resolve_trait_associated_const: unexpected vtable type
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: rustc 1.20.0-nightly (afe145d22 2017-07-23) running on x86_64-unknown-linux-gnu
thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:490:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.