Closed
Description
Since rustc 1.61, the following code is not giving a compile-time error:
fn main() {
let xs = [10, 20, 30];
println!("{}", xs[10]);
let _n = xs.len();
}
If I uncomment the last line, the compile-time error shows up.
Is this right? I would expect the compile-time error to show up in both cases (this is what happens for rustc < 1.61).
cc @oli-obk
Originally posted by @paolieri in #48920 (comment)
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: MIR optimizationsCategory: This is a bug.High priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
steffahn commentedon Sep 6, 2022
@rustbot label A-lint, regression-from-stable-to-stable
For context, the “error” pre-1.61 is the deny-by-default
unconditional_panic
lintBisection points to regression in #94934.
Dajamante commentedon Sep 6, 2022
@rustbot claim
apiraino commentedon Sep 8, 2022
WG-prioritization assigning priority (Zulip discussion).
@rustbot label -I-prioritize +P-high T-compiler
oli-obk commentedon Sep 14, 2022
duplicate of #98444