Closed
Description
The following code currently produces an ICE:
fn main() {
let bytes = [1u8, 2, 3, 4, 5, 6, 7, 8];
for [a, b, c, d] in bytes.chunks(4) {
println!("{} {} {} {}", a, b, c, d);
}
}
<anon>:4:9: 4:21 error: internal compiler error: Explicit index of non-index type `core::slice::Chunks<'_,u8>`
<anon>:4 for [a, b, c, d] in bytes.chunks(4) {
^~~~~~~~~~~~
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>', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:113
This should clearly produce a compile time error of course, but not an ICE.
Metadata
Metadata
Assignees
Labels
No labels