add run-rustfix
This commit is contained in:
parent
910a5ad2df
commit
dde26b31b6
6
tests/ui/lint/issue-109529.fixed
Normal file
6
tests/ui/lint/issue-109529.fixed
Normal file
@ -0,0 +1,6 @@
|
||||
// run-rustfix
|
||||
|
||||
fn main() {
|
||||
for _ in 0..=255 as u8 {} //~ ERROR range endpoint is out of range
|
||||
for _ in 0..=(255 as u8) {} //~ ERROR range endpoint is out of range
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
// run-rustfix
|
||||
|
||||
fn main() {
|
||||
for _ in 0..256 as u8 {} //~ ERROR range endpoint is out of range
|
||||
for _ in 0..(256 as u8) {} //~ ERROR range endpoint is out of range
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: range endpoint is out of range for `u8`
|
||||
--> $DIR/issue-109529.rs:2:14
|
||||
--> $DIR/issue-109529.rs:4:14
|
||||
|
|
||||
LL | for _ in 0..256 as u8 {}
|
||||
| ------^^^^^^
|
||||
@ -9,7 +9,7 @@ LL | for _ in 0..256 as u8 {}
|
||||
= note: `#[deny(overflowing_literals)]` on by default
|
||||
|
||||
error: range endpoint is out of range for `u8`
|
||||
--> $DIR/issue-109529.rs:3:14
|
||||
--> $DIR/issue-109529.rs:5:14
|
||||
|
|
||||
LL | for _ in 0..(256 as u8) {}
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
Loading…
Reference in New Issue
Block a user