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)
Since rustc 1.61, the following code is not giving a compile-time error:
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)