Closed
Description
This code:
fn main() {
let x = [1, 2, 3];
let y = x.as_slice();
}
Fails with:
slicesize.rs:3:13: 3:14 error: internal compiler error: UnsizeLength with bad sty: [type error]
slicesize.rs:3 let y = x.as_slice();
^
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /home/bs/src/rust/src/libsyntax/ast_util.rs:776
The ICE does not happen when the integer type is known, e.g. by using 1u8
as the first value.
Metadata
Metadata
Assignees
Labels
No labels