Closed
Description
An ICE is observable with this code:
fn part(_: u16) -> u32 {
1
}
fn main() {
for n in 100_000.. {
let _ = part(n);
}
}
thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', src/librustc_lint/types.rs:79:12
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
Changing part
to take a u32
rather than u16
makes the ICE go away.
Metadata
Metadata
Assignees
Labels
Area: Lints (warnings about flaws in source code) such as unused_mut.Category: This is a bug.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.