File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+ // run-rustfix
2+
3+ fn main() {
4+ for _ in 0..=255 as u8 {} //~ ERROR range endpoint is out of range
5+ for _ in 0..=(255 as u8) {} //~ ERROR range endpoint is out of range
6+ }
Original file line number Diff line number Diff line change 1+ // run-rustfix
2+
13fn main ( ) {
24 for _ in 0 ..256 as u8 { } //~ ERROR range endpoint is out of range
35 for _ in 0 ..( 256 as u8 ) { } //~ ERROR range endpoint is out of range
Original file line number Diff line number Diff line change 11error: range endpoint is out of range for `u8`
2- --> $DIR/issue-109529.rs:2 :14
2+ --> $DIR/issue-109529.rs:4 :14
33 |
44LL | for _ in 0..256 as u8 {}
55 | ------^^^^^^
@@ -9,7 +9,7 @@ LL | for _ in 0..256 as u8 {}
99 = note: `#[deny(overflowing_literals)]` on by default
1010
1111error: range endpoint is out of range for `u8`
12- --> $DIR/issue-109529.rs:3 :14
12+ --> $DIR/issue-109529.rs:5 :14
1313 |
1414LL | for _ in 0..(256 as u8) {}
1515 | ^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments