Closed
Description
fn test(this: ((u8, u8),)) {
assert!((this.0).1 == 0);
}
fn main() {
test(((1, 2),));
}
Build:
$ /home/omer/rust/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc --edition 2018 test2.rs -Zmir-opt-level=2
ICE:
thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', src/librustc_mir/transform/const_prop.rs:648:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: internal compiler error: unexpected panic
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.41.0-dev running on x86_64-unknown-linux-gnu
note: compiler flags: -Z mir-opt-level=2
Metadata
Metadata
Assignees
Labels
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlCategory: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.This issue requires a nightly compiler in some way.