mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 12:44:40 +00:00
23 lines
600 B
Plaintext
23 lines
600 B
Plaintext
error: casting integer literal to `i32` is unnecessary
|
|
--> $DIR/unnecessary_cast.rs:6:5
|
|
|
|
|
LL | 1i32 as i32;
|
|
| ^^^^^^^^^^^ help: try: `1_i32`
|
|
|
|
|
= note: `-D clippy::unnecessary-cast` implied by `-D warnings`
|
|
|
|
error: casting float literal to `f32` is unnecessary
|
|
--> $DIR/unnecessary_cast.rs:7:5
|
|
|
|
|
LL | 1f32 as f32;
|
|
| ^^^^^^^^^^^ help: try: `1_f32`
|
|
|
|
error: casting to the same type is unnecessary (`bool` -> `bool`)
|
|
--> $DIR/unnecessary_cast.rs:8:5
|
|
|
|
|
LL | false as bool;
|
|
| ^^^^^^^^^^^^^ help: try: `false`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|