]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/unnecessary_cast.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / unnecessary_cast.stderr
CommitLineData
cdc7bbd5 1error: casting integer literal to `i32` is unnecessary
923072b8 2 --> $DIR/unnecessary_cast.rs:14:5
f20569fa
XL
3 |
4LL | 1i32 as i32;
cdc7bbd5 5 | ^^^^^^^^^^^ help: try: `1_i32`
f20569fa
XL
6 |
7 = note: `-D clippy::unnecessary-cast` implied by `-D warnings`
8
cdc7bbd5 9error: casting float literal to `f32` is unnecessary
923072b8 10 --> $DIR/unnecessary_cast.rs:15:5
f20569fa
XL
11 |
12LL | 1f32 as f32;
cdc7bbd5 13 | ^^^^^^^^^^^ help: try: `1_f32`
f20569fa
XL
14
15error: casting to the same type is unnecessary (`bool` -> `bool`)
923072b8 16 --> $DIR/unnecessary_cast.rs:16:5
f20569fa
XL
17 |
18LL | false as bool;
cdc7bbd5 19 | ^^^^^^^^^^^^^ help: try: `false`
f20569fa 20
5099ac24 21error: casting integer literal to `i32` is unnecessary
923072b8 22 --> $DIR/unnecessary_cast.rs:19:5
5099ac24
FG
23 |
24LL | -1_i32 as i32;
25 | ^^^^^^^^^^^^^ help: try: `-1_i32`
26
27error: casting integer literal to `i32` is unnecessary
923072b8 28 --> $DIR/unnecessary_cast.rs:20:5
5099ac24
FG
29 |
30LL | - 1_i32 as i32;
31 | ^^^^^^^^^^^^^^ help: try: `- 1_i32`
32
33error: casting float literal to `f32` is unnecessary
923072b8 34 --> $DIR/unnecessary_cast.rs:21:5
5099ac24
FG
35 |
36LL | -1f32 as f32;
37 | ^^^^^^^^^^^^ help: try: `-1_f32`
38
39error: casting integer literal to `i32` is unnecessary
923072b8 40 --> $DIR/unnecessary_cast.rs:22:5
5099ac24
FG
41 |
42LL | 1_i32 as i32;
43 | ^^^^^^^^^^^^ help: try: `1_i32`
44
45error: casting float literal to `f32` is unnecessary
923072b8 46 --> $DIR/unnecessary_cast.rs:23:5
5099ac24
FG
47 |
48LL | 1_f32 as f32;
49 | ^^^^^^^^^^^^ help: try: `1_f32`
50
923072b8
FG
51error: casting integer literal to `f32` is unnecessary
52 --> $DIR/unnecessary_cast.rs:53:9
53 |
54LL | 100 as f32;
55 | ^^^^^^^^^^ help: try: `100_f32`
56
57error: casting integer literal to `f64` is unnecessary
58 --> $DIR/unnecessary_cast.rs:54:9
59 |
60LL | 100 as f64;
61 | ^^^^^^^^^^ help: try: `100_f64`
62
63error: casting integer literal to `f64` is unnecessary
64 --> $DIR/unnecessary_cast.rs:55:9
65 |
66LL | 100_i32 as f64;
67 | ^^^^^^^^^^^^^^ help: try: `100_f64`
68
69error: casting integer literal to `f32` is unnecessary
70 --> $DIR/unnecessary_cast.rs:56:17
71 |
72LL | let _ = -100 as f32;
73 | ^^^^^^^^^^^ help: try: `-100_f32`
74
75error: casting integer literal to `f64` is unnecessary
76 --> $DIR/unnecessary_cast.rs:57:17
77 |
78LL | let _ = -100 as f64;
79 | ^^^^^^^^^^^ help: try: `-100_f64`
80
81error: casting integer literal to `f64` is unnecessary
82 --> $DIR/unnecessary_cast.rs:58:17
83 |
84LL | let _ = -100_i32 as f64;
85 | ^^^^^^^^^^^^^^^ help: try: `-100_f64`
86
87error: casting float literal to `f32` is unnecessary
88 --> $DIR/unnecessary_cast.rs:59:9
89 |
90LL | 100. as f32;
91 | ^^^^^^^^^^^ help: try: `100_f32`
92
93error: casting float literal to `f64` is unnecessary
94 --> $DIR/unnecessary_cast.rs:60:9
95 |
96LL | 100. as f64;
97 | ^^^^^^^^^^^ help: try: `100_f64`
98
99error: casting integer literal to `u32` is unnecessary
100 --> $DIR/unnecessary_cast.rs:72:9
101 |
102LL | 1 as u32;
103 | ^^^^^^^^ help: try: `1_u32`
104
105error: casting integer literal to `i32` is unnecessary
106 --> $DIR/unnecessary_cast.rs:73:9
107 |
108LL | 0x10 as i32;
109 | ^^^^^^^^^^^ help: try: `0x10_i32`
110
111error: casting integer literal to `usize` is unnecessary
112 --> $DIR/unnecessary_cast.rs:74:9
113 |
114LL | 0b10 as usize;
115 | ^^^^^^^^^^^^^ help: try: `0b10_usize`
116
117error: casting integer literal to `u16` is unnecessary
118 --> $DIR/unnecessary_cast.rs:75:9
119 |
120LL | 0o73 as u16;
121 | ^^^^^^^^^^^ help: try: `0o73_u16`
122
123error: casting integer literal to `u32` is unnecessary
124 --> $DIR/unnecessary_cast.rs:76:9
125 |
126LL | 1_000_000_000 as u32;
127 | ^^^^^^^^^^^^^^^^^^^^ help: try: `1_000_000_000_u32`
128
129error: casting float literal to `f64` is unnecessary
130 --> $DIR/unnecessary_cast.rs:78:9
131 |
132LL | 1.0 as f64;
133 | ^^^^^^^^^^ help: try: `1.0_f64`
134
135error: casting float literal to `f32` is unnecessary
136 --> $DIR/unnecessary_cast.rs:79:9
137 |
138LL | 0.5 as f32;
139 | ^^^^^^^^^^ help: try: `0.5_f32`
140
141error: casting integer literal to `i32` is unnecessary
142 --> $DIR/unnecessary_cast.rs:83:17
143 |
144LL | let _ = -1 as i32;
145 | ^^^^^^^^^ help: try: `-1_i32`
146
147error: casting float literal to `f32` is unnecessary
148 --> $DIR/unnecessary_cast.rs:84:17
149 |
150LL | let _ = -1.0 as f32;
151 | ^^^^^^^^^^^ help: try: `-1.0_f32`
152
153error: aborting due to 25 previous errors
f20569fa 154