rust/tests/ui/consts/const-tup-index-span.rs
Tomasz Miąsko 67f455afe1 Suppress "erroneous constant used" for constants tainted by errors
When constant evaluation fails because its MIR is tainted by errors,
suppress note indicating that erroneous constant was used, since those
errors have to be fixed regardless of the constant being used or not.
2023-05-15 00:00:00 +00:00

10 lines
174 B
Rust

// Test spans of errors
const TUP: (usize,) = 5usize << 64;
//~^ ERROR mismatched types
//~| expected `(usize,)`, found `usize`
const ARR: [i32; TUP.0] = [];
fn main() {
}