]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/fn_to_numeric_cast_any.stderr
Auto merge of #97944 - nikic:freebsd-update, r=Mark-Simulacrum
[rust.git] / src / tools / clippy / tests / ui / fn_to_numeric_cast_any.stderr
1 error: casting function pointer `foo` to `i8`
2   --> $DIR/fn_to_numeric_cast_any.rs:23:13
3    |
4 LL |     let _ = foo as i8;
5    |             ^^^^^^^^^ help: did you mean to invoke the function?: `foo() as i8`
6    |
7    = note: `-D clippy::fn-to-numeric-cast-any` implied by `-D warnings`
8
9 error: casting function pointer `foo` to `i16`
10   --> $DIR/fn_to_numeric_cast_any.rs:24:13
11    |
12 LL |     let _ = foo as i16;
13    |             ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as i16`
14
15 error: casting function pointer `foo` to `i32`
16   --> $DIR/fn_to_numeric_cast_any.rs:25:13
17    |
18 LL |     let _ = foo as i32;
19    |             ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as i32`
20
21 error: casting function pointer `foo` to `i64`
22   --> $DIR/fn_to_numeric_cast_any.rs:26:13
23    |
24 LL |     let _ = foo as i64;
25    |             ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as i64`
26
27 error: casting function pointer `foo` to `i128`
28   --> $DIR/fn_to_numeric_cast_any.rs:27:13
29    |
30 LL |     let _ = foo as i128;
31    |             ^^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as i128`
32
33 error: casting function pointer `foo` to `isize`
34   --> $DIR/fn_to_numeric_cast_any.rs:28:13
35    |
36 LL |     let _ = foo as isize;
37    |             ^^^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as isize`
38
39 error: casting function pointer `foo` to `u8`
40   --> $DIR/fn_to_numeric_cast_any.rs:30:13
41    |
42 LL |     let _ = foo as u8;
43    |             ^^^^^^^^^ help: did you mean to invoke the function?: `foo() as u8`
44
45 error: casting function pointer `foo` to `u16`
46   --> $DIR/fn_to_numeric_cast_any.rs:31:13
47    |
48 LL |     let _ = foo as u16;
49    |             ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as u16`
50
51 error: casting function pointer `foo` to `u32`
52   --> $DIR/fn_to_numeric_cast_any.rs:32:13
53    |
54 LL |     let _ = foo as u32;
55    |             ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as u32`
56
57 error: casting function pointer `foo` to `u64`
58   --> $DIR/fn_to_numeric_cast_any.rs:33:13
59    |
60 LL |     let _ = foo as u64;
61    |             ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as u64`
62
63 error: casting function pointer `foo` to `u128`
64   --> $DIR/fn_to_numeric_cast_any.rs:34:13
65    |
66 LL |     let _ = foo as u128;
67    |             ^^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as u128`
68
69 error: casting function pointer `foo` to `usize`
70   --> $DIR/fn_to_numeric_cast_any.rs:35:13
71    |
72 LL |     let _ = foo as usize;
73    |             ^^^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as usize`
74
75 error: casting function pointer `Struct::static_method` to `usize`
76   --> $DIR/fn_to_numeric_cast_any.rs:39:13
77    |
78 LL |     let _ = Struct::static_method as usize;
79    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean to invoke the function?: `Struct::static_method() as usize`
80
81 error: casting function pointer `f` to `usize`
82   --> $DIR/fn_to_numeric_cast_any.rs:43:5
83    |
84 LL |     f as usize
85    |     ^^^^^^^^^^ help: did you mean to invoke the function?: `f() as usize`
86
87 error: casting function pointer `T::static_method` to `usize`
88   --> $DIR/fn_to_numeric_cast_any.rs:47:5
89    |
90 LL |     T::static_method as usize
91    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean to invoke the function?: `T::static_method() as usize`
92
93 error: casting function pointer `(clos as fn(u32) -> u32)` to `usize`
94   --> $DIR/fn_to_numeric_cast_any.rs:53:13
95    |
96 LL |     let _ = (clos as fn(u32) -> u32) as usize;
97    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean to invoke the function?: `(clos as fn(u32) -> u32)() as usize`
98
99 error: casting function pointer `foo` to `*const ()`
100   --> $DIR/fn_to_numeric_cast_any.rs:57:13
101    |
102 LL |     let _ = foo as *const ();
103    |             ^^^^^^^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as *const ()`
104
105 error: aborting due to 17 previous errors
106