]> git.lizzy.rs Git - rust.git/blob - tests/ui/unnecessary_cast.stderr
Rollup merge of #92849 - flip1995:clippyup, r=Manishearth
[rust.git] / tests / ui / unnecessary_cast.stderr
1 error: casting integer literal to `i32` is unnecessary
2   --> $DIR/unnecessary_cast.rs:6:5
3    |
4 LL |     1i32 as i32;
5    |     ^^^^^^^^^^^ help: try: `1_i32`
6    |
7    = note: `-D clippy::unnecessary-cast` implied by `-D warnings`
8
9 error: casting float literal to `f32` is unnecessary
10   --> $DIR/unnecessary_cast.rs:7:5
11    |
12 LL |     1f32 as f32;
13    |     ^^^^^^^^^^^ help: try: `1_f32`
14
15 error: casting to the same type is unnecessary (`bool` -> `bool`)
16   --> $DIR/unnecessary_cast.rs:8:5
17    |
18 LL |     false as bool;
19    |     ^^^^^^^^^^^^^ help: try: `false`
20
21 error: aborting due to 3 previous errors
22