rust/tests/ui/range/misleading-field-access-hint.rs
Falco Hirschenberger 8f2273e518 Fix #131471, range misleading field access
Fixes #131471 by checking if the range-start is a literal.
2024-10-18 17:27:28 +02:00

9 lines
194 B
Rust

// Check if rustc still displays the misleading hint to write `.` instead of `..`
fn main() {
let width = 10;
// ...
for _ in 0..w {
//~^ ERROR cannot find value `w`
}
}