Skip to content

Commit dde26b3

Browse files
committed
add run-rustfix
1 parent 910a5ad commit dde26b3

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

tests/ui/lint/issue-109529.fixed

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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+
}

tests/ui/lint/issue-109529.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// run-rustfix
2+
13
fn 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

tests/ui/lint/issue-109529.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: range endpoint is out of range for `u8`
2-
--> $DIR/issue-109529.rs:2:14
2+
--> $DIR/issue-109529.rs:4:14
33
|
44
LL | 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

1111
error: range endpoint is out of range for `u8`
12-
--> $DIR/issue-109529.rs:3:14
12+
--> $DIR/issue-109529.rs:5:14
1313
|
1414
LL | for _ in 0..(256 as u8) {}
1515
| ^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)