@@ -8,9 +8,8 @@ LL | let _ = foo as i8;
8
8
= help: to override `-D warnings` add `#[allow(clippy::fn_to_numeric_cast_any)]`
9
9
help: did you mean to invoke the function?
10
10
|
11
- LL - let _ = foo as i8;
12
- LL + let _ = foo() as i8;
13
- |
11
+ LL | let _ = foo() as i8;
12
+ | ++
14
13
15
14
error: casting function pointer `foo` to `i16`
16
15
--> tests/ui/fn_to_numeric_cast_any.rs:26:13
@@ -20,9 +19,8 @@ LL | let _ = foo as i16;
20
19
|
21
20
help: did you mean to invoke the function?
22
21
|
23
- LL - let _ = foo as i16;
24
- LL + let _ = foo() as i16;
25
- |
22
+ LL | let _ = foo() as i16;
23
+ | ++
26
24
27
25
error: casting function pointer `foo` to `i32`
28
26
--> tests/ui/fn_to_numeric_cast_any.rs:28:13
@@ -32,9 +30,8 @@ LL | let _ = foo as i32;
32
30
|
33
31
help: did you mean to invoke the function?
34
32
|
35
- LL - let _ = foo as i32;
36
- LL + let _ = foo() as i32;
37
- |
33
+ LL | let _ = foo() as i32;
34
+ | ++
38
35
39
36
error: casting function pointer `foo` to `i64`
40
37
--> tests/ui/fn_to_numeric_cast_any.rs:30:13
@@ -44,9 +41,8 @@ LL | let _ = foo as i64;
44
41
|
45
42
help: did you mean to invoke the function?
46
43
|
47
- LL - let _ = foo as i64;
48
- LL + let _ = foo() as i64;
49
- |
44
+ LL | let _ = foo() as i64;
45
+ | ++
50
46
51
47
error: casting function pointer `foo` to `i128`
52
48
--> tests/ui/fn_to_numeric_cast_any.rs:32:13
@@ -56,9 +52,8 @@ LL | let _ = foo as i128;
56
52
|
57
53
help: did you mean to invoke the function?
58
54
|
59
- LL - let _ = foo as i128;
60
- LL + let _ = foo() as i128;
61
- |
55
+ LL | let _ = foo() as i128;
56
+ | ++
62
57
63
58
error: casting function pointer `foo` to `isize`
64
59
--> tests/ui/fn_to_numeric_cast_any.rs:34:13
@@ -68,9 +63,8 @@ LL | let _ = foo as isize;
68
63
|
69
64
help: did you mean to invoke the function?
70
65
|
71
- LL - let _ = foo as isize;
72
- LL + let _ = foo() as isize;
73
- |
66
+ LL | let _ = foo() as isize;
67
+ | ++
74
68
75
69
error: casting function pointer `foo` to `u8`
76
70
--> tests/ui/fn_to_numeric_cast_any.rs:37:13
@@ -80,9 +74,8 @@ LL | let _ = foo as u8;
80
74
|
81
75
help: did you mean to invoke the function?
82
76
|
83
- LL - let _ = foo as u8;
84
- LL + let _ = foo() as u8;
85
- |
77
+ LL | let _ = foo() as u8;
78
+ | ++
86
79
87
80
error: casting function pointer `foo` to `u16`
88
81
--> tests/ui/fn_to_numeric_cast_any.rs:39:13
@@ -92,9 +85,8 @@ LL | let _ = foo as u16;
92
85
|
93
86
help: did you mean to invoke the function?
94
87
|
95
- LL - let _ = foo as u16;
96
- LL + let _ = foo() as u16;
97
- |
88
+ LL | let _ = foo() as u16;
89
+ | ++
98
90
99
91
error: casting function pointer `foo` to `u32`
100
92
--> tests/ui/fn_to_numeric_cast_any.rs:41:13
@@ -104,9 +96,8 @@ LL | let _ = foo as u32;
104
96
|
105
97
help: did you mean to invoke the function?
106
98
|
107
- LL - let _ = foo as u32;
108
- LL + let _ = foo() as u32;
109
- |
99
+ LL | let _ = foo() as u32;
100
+ | ++
110
101
111
102
error: casting function pointer `foo` to `u64`
112
103
--> tests/ui/fn_to_numeric_cast_any.rs:43:13
@@ -116,9 +107,8 @@ LL | let _ = foo as u64;
116
107
|
117
108
help: did you mean to invoke the function?
118
109
|
119
- LL - let _ = foo as u64;
120
- LL + let _ = foo() as u64;
121
- |
110
+ LL | let _ = foo() as u64;
111
+ | ++
122
112
123
113
error: casting function pointer `foo` to `u128`
124
114
--> tests/ui/fn_to_numeric_cast_any.rs:45:13
@@ -128,9 +118,8 @@ LL | let _ = foo as u128;
128
118
|
129
119
help: did you mean to invoke the function?
130
120
|
131
- LL - let _ = foo as u128;
132
- LL + let _ = foo() as u128;
133
- |
121
+ LL | let _ = foo() as u128;
122
+ | ++
134
123
135
124
error: casting function pointer `foo` to `usize`
136
125
--> tests/ui/fn_to_numeric_cast_any.rs:47:13
@@ -140,9 +129,8 @@ LL | let _ = foo as usize;
140
129
|
141
130
help: did you mean to invoke the function?
142
131
|
143
- LL - let _ = foo as usize;
144
- LL + let _ = foo() as usize;
145
- |
132
+ LL | let _ = foo() as usize;
133
+ | ++
146
134
147
135
error: casting function pointer `Struct::static_method` to `usize`
148
136
--> tests/ui/fn_to_numeric_cast_any.rs:52:13
@@ -152,9 +140,8 @@ LL | let _ = Struct::static_method as usize;
152
140
|
153
141
help: did you mean to invoke the function?
154
142
|
155
- LL - let _ = Struct::static_method as usize;
156
- LL + let _ = Struct::static_method() as usize;
157
- |
143
+ LL | let _ = Struct::static_method() as usize;
144
+ | ++
158
145
159
146
error: casting function pointer `f` to `usize`
160
147
--> tests/ui/fn_to_numeric_cast_any.rs:57:5
@@ -164,9 +151,8 @@ LL | f as usize
164
151
|
165
152
help: did you mean to invoke the function?
166
153
|
167
- LL - f as usize
168
- LL + f() as usize
169
- |
154
+ LL | f() as usize
155
+ | ++
170
156
171
157
error: casting function pointer `T::static_method` to `usize`
172
158
--> tests/ui/fn_to_numeric_cast_any.rs:62:5
@@ -176,9 +162,8 @@ LL | T::static_method as usize
176
162
|
177
163
help: did you mean to invoke the function?
178
164
|
179
- LL - T::static_method as usize
180
- LL + T::static_method() as usize
181
- |
165
+ LL | T::static_method() as usize
166
+ | ++
182
167
183
168
error: casting function pointer `(clos as fn(u32) -> u32)` to `usize`
184
169
--> tests/ui/fn_to_numeric_cast_any.rs:69:13
@@ -188,9 +173,8 @@ LL | let _ = (clos as fn(u32) -> u32) as usize;
188
173
|
189
174
help: did you mean to invoke the function?
190
175
|
191
- LL - let _ = (clos as fn(u32) -> u32) as usize;
192
- LL + let _ = (clos as fn(u32) -> u32)() as usize;
193
- |
176
+ LL | let _ = (clos as fn(u32) -> u32)() as usize;
177
+ | ++
194
178
195
179
error: casting function pointer `foo` to `*const ()`
196
180
--> tests/ui/fn_to_numeric_cast_any.rs:74:13
@@ -200,9 +184,8 @@ LL | let _ = foo as *const ();
200
184
|
201
185
help: did you mean to invoke the function?
202
186
|
203
- LL - let _ = foo as *const ();
204
- LL + let _ = foo() as *const ();
205
- |
187
+ LL | let _ = foo() as *const ();
188
+ | ++
206
189
207
190
error: aborting due to 17 previous errors
208
191
0 commit comments