Closed
Description
Works on stable and beta but not on nigthly
I tried this code in the playground:
struct X {
a: [usize;26],
}
impl X {
pub fn foo()->Self{
let a = [usize;5];
X{a:a}
}
}
I expected to get:
error[E0425]: unresolved name `usize`
Instead, this happened:
error: internal compiler error: ../src/librustc_typeck/check/mod.rs:4396: unexpected definition: PrimTy(TyUint(usize))
Meta
rustc 1.15.0-nightly (daf8c1dfc 2016-12-05)
Backtrace:
15: 0x7fec6098187 - rustc_typeck::check::FnCtxt::check_stmt::h155d968e61fdfae6
16: 0x7fec60984be - rustc_typeck::check::FnCtxt::check_block_no_value::h3ac235dc3eaa76c3
17: 0x7fec608326e - rustc_typeck::check::FnCtxt::check_struct_path::h1ff2872963f8985c
18: 0x7fec6082d81 - rustc_typeck::check::FnCtxt::check_struct_path::h1ff2872963f8985c
19: 0x7fec6062c1d - <rustc_typeck::coherence::orphan::OrphanChecker<'cx, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_im
pl_item::habbc901b4cfa4531
20: 0x7fec6060f57 - rustc_typeck::check::check_drop_impls::hb6e6926f4342f9e2
21: 0x7fec6065296 - rustc_typeck::check::check_item_body::h1e039ede2f960fb9
22: 0x7fec605dbbd - rustc_typeck::check::check_item_bodies::hd22adb7703cc56d7
23: 0x7fec60ea500 - rustc_typeck::check_crate::h92f6bdfe03b6afba
24: 0x7fecec9c98e - rustc_driver::driver::count_nodes::h84f03318ea2320a8
25: 0x7fecebf5bcf - <unknown>
26: 0x7fecec78932 - rustc_driver::driver::compile_input::h8e119234b60571d5
27: 0x7fececc9f27 - rustc_driver::run_compiler::h57c4f233cd1a0c04
28: 0x7fecebada1e - <unknown>
29: 0x7fec8f85bf1 - _rust_maybe_catch_panic
30: 0x7fecebd7794 - <unknown>
31: 0x7fec8f7d86e - std::sys::imp::thread::Thread::new::hd990f5dcc0d4bad9
32: 0x76f059cc - BaseThreadInitThunk