1 error: casting function pointer `foo` to `i8`
2 --> $DIR/fn_to_numeric_cast_any.rs:23:13
4 LL | let _ = foo as i8;
5 | ^^^^^^^^^ help: did you mean to invoke the function?: `foo() as i8`
7 = note: `-D clippy::fn-to-numeric-cast-any` implied by `-D warnings`
9 error: casting function pointer `foo` to `i16`
10 --> $DIR/fn_to_numeric_cast_any.rs:24:13
12 LL | let _ = foo as i16;
13 | ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as i16`
15 error: casting function pointer `foo` to `i32`
16 --> $DIR/fn_to_numeric_cast_any.rs:25:13
18 LL | let _ = foo as i32;
19 | ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as i32`
21 error: casting function pointer `foo` to `i64`
22 --> $DIR/fn_to_numeric_cast_any.rs:26:13
24 LL | let _ = foo as i64;
25 | ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as i64`
27 error: casting function pointer `foo` to `i128`
28 --> $DIR/fn_to_numeric_cast_any.rs:27:13
30 LL | let _ = foo as i128;
31 | ^^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as i128`
33 error: casting function pointer `foo` to `isize`
34 --> $DIR/fn_to_numeric_cast_any.rs:28:13
36 LL | let _ = foo as isize;
37 | ^^^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as isize`
39 error: casting function pointer `foo` to `u8`
40 --> $DIR/fn_to_numeric_cast_any.rs:30:13
42 LL | let _ = foo as u8;
43 | ^^^^^^^^^ help: did you mean to invoke the function?: `foo() as u8`
45 error: casting function pointer `foo` to `u16`
46 --> $DIR/fn_to_numeric_cast_any.rs:31:13
48 LL | let _ = foo as u16;
49 | ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as u16`
51 error: casting function pointer `foo` to `u32`
52 --> $DIR/fn_to_numeric_cast_any.rs:32:13
54 LL | let _ = foo as u32;
55 | ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as u32`
57 error: casting function pointer `foo` to `u64`
58 --> $DIR/fn_to_numeric_cast_any.rs:33:13
60 LL | let _ = foo as u64;
61 | ^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as u64`
63 error: casting function pointer `foo` to `u128`
64 --> $DIR/fn_to_numeric_cast_any.rs:34:13
66 LL | let _ = foo as u128;
67 | ^^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as u128`
69 error: casting function pointer `foo` to `usize`
70 --> $DIR/fn_to_numeric_cast_any.rs:35:13
72 LL | let _ = foo as usize;
73 | ^^^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as usize`
75 error: casting function pointer `Struct::static_method` to `usize`
76 --> $DIR/fn_to_numeric_cast_any.rs:39:13
78 LL | let _ = Struct::static_method as usize;
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean to invoke the function?: `Struct::static_method() as usize`
81 error: casting function pointer `f` to `usize`
82 --> $DIR/fn_to_numeric_cast_any.rs:43:5
85 | ^^^^^^^^^^ help: did you mean to invoke the function?: `f() as usize`
87 error: casting function pointer `T::static_method` to `usize`
88 --> $DIR/fn_to_numeric_cast_any.rs:47:5
90 LL | T::static_method as usize
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean to invoke the function?: `T::static_method() as usize`
93 error: casting function pointer `(clos as fn(u32) -> u32)` to `usize`
94 --> $DIR/fn_to_numeric_cast_any.rs:53:13
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`
99 error: casting function pointer `foo` to `*const ()`
100 --> $DIR/fn_to_numeric_cast_any.rs:57:13
102 LL | let _ = foo as *const ();
103 | ^^^^^^^^^^^^^^^^ help: did you mean to invoke the function?: `foo() as *const ()`
105 error: aborting due to 17 previous errors