1 error: casting function pointer `foo` to `i8`, which truncates the value
2 --> $DIR/fn_to_numeric_cast_32bit.rs:10:13
4 LL | let _ = foo as i8;
5 | ^^^^^^^^^ help: try: `foo as usize`
7 = note: `-D clippy::fn-to-numeric-cast-with-truncation` implied by `-D warnings`
9 error: casting function pointer `foo` to `i16`, which truncates the value
10 --> $DIR/fn_to_numeric_cast_32bit.rs:11:13
12 LL | let _ = foo as i16;
13 | ^^^^^^^^^^ help: try: `foo as usize`
15 error: casting function pointer `foo` to `i32`
16 --> $DIR/fn_to_numeric_cast_32bit.rs:12:13
18 LL | let _ = foo as i32;
19 | ^^^^^^^^^^ help: try: `foo as usize`
21 = note: `-D clippy::fn-to-numeric-cast` implied by `-D warnings`
23 error: casting function pointer `foo` to `i64`
24 --> $DIR/fn_to_numeric_cast_32bit.rs:13:13
26 LL | let _ = foo as i64;
27 | ^^^^^^^^^^ help: try: `foo as usize`
29 error: casting function pointer `foo` to `i128`
30 --> $DIR/fn_to_numeric_cast_32bit.rs:14:13
32 LL | let _ = foo as i128;
33 | ^^^^^^^^^^^ help: try: `foo as usize`
35 error: casting function pointer `foo` to `isize`
36 --> $DIR/fn_to_numeric_cast_32bit.rs:15:13
38 LL | let _ = foo as isize;
39 | ^^^^^^^^^^^^ help: try: `foo as usize`
41 error: casting function pointer `foo` to `u8`, which truncates the value
42 --> $DIR/fn_to_numeric_cast_32bit.rs:17:13
44 LL | let _ = foo as u8;
45 | ^^^^^^^^^ help: try: `foo as usize`
47 error: casting function pointer `foo` to `u16`, which truncates the value
48 --> $DIR/fn_to_numeric_cast_32bit.rs:18:13
50 LL | let _ = foo as u16;
51 | ^^^^^^^^^^ help: try: `foo as usize`
53 error: casting function pointer `foo` to `u32`
54 --> $DIR/fn_to_numeric_cast_32bit.rs:19:13
56 LL | let _ = foo as u32;
57 | ^^^^^^^^^^ help: try: `foo as usize`
59 error: casting function pointer `foo` to `u64`
60 --> $DIR/fn_to_numeric_cast_32bit.rs:20:13
62 LL | let _ = foo as u64;
63 | ^^^^^^^^^^ help: try: `foo as usize`
65 error: casting function pointer `foo` to `u128`
66 --> $DIR/fn_to_numeric_cast_32bit.rs:21:13
68 LL | let _ = foo as u128;
69 | ^^^^^^^^^^^ help: try: `foo as usize`
71 error: casting function pointer `abc` to `i8`, which truncates the value
72 --> $DIR/fn_to_numeric_cast_32bit.rs:34:13
74 LL | let _ = abc as i8;
75 | ^^^^^^^^^ help: try: `abc as usize`
77 error: casting function pointer `abc` to `i16`, which truncates the value
78 --> $DIR/fn_to_numeric_cast_32bit.rs:35:13
80 LL | let _ = abc as i16;
81 | ^^^^^^^^^^ help: try: `abc as usize`
83 error: casting function pointer `abc` to `i32`
84 --> $DIR/fn_to_numeric_cast_32bit.rs:36:13
86 LL | let _ = abc as i32;
87 | ^^^^^^^^^^ help: try: `abc as usize`
89 error: casting function pointer `abc` to `i64`
90 --> $DIR/fn_to_numeric_cast_32bit.rs:37:13
92 LL | let _ = abc as i64;
93 | ^^^^^^^^^^ help: try: `abc as usize`
95 error: casting function pointer `abc` to `i128`
96 --> $DIR/fn_to_numeric_cast_32bit.rs:38:13
98 LL | let _ = abc as i128;
99 | ^^^^^^^^^^^ help: try: `abc as usize`
101 error: casting function pointer `abc` to `isize`
102 --> $DIR/fn_to_numeric_cast_32bit.rs:39:13
104 LL | let _ = abc as isize;
105 | ^^^^^^^^^^^^ help: try: `abc as usize`
107 error: casting function pointer `abc` to `u8`, which truncates the value
108 --> $DIR/fn_to_numeric_cast_32bit.rs:41:13
110 LL | let _ = abc as u8;
111 | ^^^^^^^^^ help: try: `abc as usize`
113 error: casting function pointer `abc` to `u16`, which truncates the value
114 --> $DIR/fn_to_numeric_cast_32bit.rs:42:13
116 LL | let _ = abc as u16;
117 | ^^^^^^^^^^ help: try: `abc as usize`
119 error: casting function pointer `abc` to `u32`
120 --> $DIR/fn_to_numeric_cast_32bit.rs:43:13
122 LL | let _ = abc as u32;
123 | ^^^^^^^^^^ help: try: `abc as usize`
125 error: casting function pointer `abc` to `u64`
126 --> $DIR/fn_to_numeric_cast_32bit.rs:44:13
128 LL | let _ = abc as u64;
129 | ^^^^^^^^^^ help: try: `abc as usize`
131 error: casting function pointer `abc` to `u128`
132 --> $DIR/fn_to_numeric_cast_32bit.rs:45:13
134 LL | let _ = abc as u128;
135 | ^^^^^^^^^^^ help: try: `abc as usize`
137 error: casting function pointer `f` to `i32`
138 --> $DIR/fn_to_numeric_cast_32bit.rs:52:5
141 | ^^^^^^^^ help: try: `f as usize`
143 error: aborting due to 23 previous errors