mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
Fix test file
This commit is contained in:
parent
02f01104bf
commit
30f80c3b8c
3 changed files with 10 additions and 10 deletions
|
@ -30,6 +30,6 @@ fn main() {
|
|||
|
||||
1.0 as u16;
|
||||
|
||||
-1_i32;
|
||||
-1.0_f32;
|
||||
let _ = -1_i32;
|
||||
let _ = -1.0_f32;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,6 @@ fn main() {
|
|||
|
||||
1.0 as u16;
|
||||
|
||||
-1 as i32;
|
||||
-1.0 as f32;
|
||||
let _ = -1 as i32;
|
||||
let _ = -1.0 as f32;
|
||||
}
|
||||
|
|
|
@ -61,16 +61,16 @@ LL | 0.5 as f32;
|
|||
| ^^^^^^^^^^ help: try: `0.5_f32`
|
||||
|
||||
error: casting integer literal to `i32` is unnecessary
|
||||
--> $DIR/unnecessary_cast_fixable.rs:33:5
|
||||
--> $DIR/unnecessary_cast_fixable.rs:33:13
|
||||
|
|
||||
LL | -1 as i32;
|
||||
| ^^^^^^^^^ help: try: `-1_i32`
|
||||
LL | let _ = -1 as i32;
|
||||
| ^^^^^^^^^ help: try: `-1_i32`
|
||||
|
||||
error: casting float literal to `f32` is unnecessary
|
||||
--> $DIR/unnecessary_cast_fixable.rs:34:5
|
||||
--> $DIR/unnecessary_cast_fixable.rs:34:13
|
||||
|
|
||||
LL | -1.0 as f32;
|
||||
| ^^^^^^^^^^^ help: try: `-1.0_f32`
|
||||
LL | let _ = -1.0 as f32;
|
||||
| ^^^^^^^^^^^ help: try: `-1.0_f32`
|
||||
|
||||
error: aborting due to 12 previous errors
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue