1 error: casting function pointer `foo` to `i8`, which truncates the value
2 --> $DIR/fn_to_numeric_cast.rs:19: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.rs:20:13
12 LL | let _ = foo as i16;
13 | ^^^^^^^^^^ help: try: `foo as usize`
15 error: casting function pointer `foo` to `i32`, which truncates the value
16 --> $DIR/fn_to_numeric_cast.rs:21:13
18 LL | let _ = foo as i32;
19 | ^^^^^^^^^^ help: try: `foo as usize`
21 error: casting function pointer `foo` to `i64`
22 --> $DIR/fn_to_numeric_cast.rs:22:13
24 LL | let _ = foo as i64;
25 | ^^^^^^^^^^ help: try: `foo as usize`
27 = note: `-D clippy::fn-to-numeric-cast` implied by `-D warnings`
29 error: casting function pointer `foo` to `i128`
30 --> $DIR/fn_to_numeric_cast.rs:23: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.rs:24: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.rs:26: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.rs:27:13
50 LL | let _ = foo as u16;
51 | ^^^^^^^^^^ help: try: `foo as usize`
53 error: casting function pointer `foo` to `u32`, which truncates the value
54 --> $DIR/fn_to_numeric_cast.rs:28: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.rs:29: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.rs:30: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.rs:43: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.rs:44:13
80 LL | let _ = abc as i16;
81 | ^^^^^^^^^^ help: try: `abc as usize`
83 error: casting function pointer `abc` to `i32`, which truncates the value
84 --> $DIR/fn_to_numeric_cast.rs:45: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.rs:46: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.rs:47: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.rs:48: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.rs:50: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.rs:51:13
116 LL | let _ = abc as u16;
117 | ^^^^^^^^^^ help: try: `abc as usize`
119 error: casting function pointer `abc` to `u32`, which truncates the value
120 --> $DIR/fn_to_numeric_cast.rs:52: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.rs:53: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.rs:54:13
134 LL | let _ = abc as u128;
135 | ^^^^^^^^^^^ help: try: `abc as usize`
137 error: casting function pointer `f` to `i32`, which truncates the value
138 --> $DIR/fn_to_numeric_cast.rs:61:5
141 | ^^^^^^^^ help: try: `f as usize`
143 error: aborting due to 23 previous errors