]> git.lizzy.rs Git - rust.git/blob - tests/ui/fn_to_numeric_cast.stderr
Reimplement the `fn_to_numeric_cast_with_truncation` lint
[rust.git] / tests / ui / fn_to_numeric_cast.stderr
1 error: casting function pointer `foo` to `i8`
2  --> $DIR/fn_to_numeric_cast.rs:8:13
3   |
4 8 |     let _ = foo as i8;
5   |             ^^^^^^^^^ help: try: `foo as usize`
6   |
7   = note: `-D clippy::fn-to-numeric-cast` implied by `-D warnings`
8
9 error: casting function pointer `foo` to `i16`
10  --> $DIR/fn_to_numeric_cast.rs:9:13
11   |
12 9 |     let _ = foo as i16;
13   |             ^^^^^^^^^^ help: try: `foo as usize`
14
15 error: casting function pointer `foo` to `i32`
16   --> $DIR/fn_to_numeric_cast.rs:10:13
17    |
18 10 |     let _ = foo as i32;
19    |             ^^^^^^^^^^ help: try: `foo as usize`
20
21 error: casting function pointer `foo` to `i64`
22   --> $DIR/fn_to_numeric_cast.rs:11:13
23    |
24 11 |     let _ = foo as i64;
25    |             ^^^^^^^^^^ help: try: `foo as usize`
26
27 error: casting function pointer `foo` to `i128`
28   --> $DIR/fn_to_numeric_cast.rs:12:13
29    |
30 12 |     let _ = foo as i128;
31    |             ^^^^^^^^^^^ help: try: `foo as usize`
32
33 error: casting function pointer `foo` to `isize`
34   --> $DIR/fn_to_numeric_cast.rs:13:13
35    |
36 13 |     let _ = foo as isize;
37    |             ^^^^^^^^^^^^ help: try: `foo as usize`
38
39 error: casting function pointer `foo` to `u8`
40   --> $DIR/fn_to_numeric_cast.rs:15:13
41    |
42 15 |     let _ = foo as u8;
43    |             ^^^^^^^^^ help: try: `foo as usize`
44
45 error: casting function pointer `foo` to `u16`
46   --> $DIR/fn_to_numeric_cast.rs:16:13
47    |
48 16 |     let _ = foo as u16;
49    |             ^^^^^^^^^^ help: try: `foo as usize`
50
51 error: casting function pointer `foo` to `u32`
52   --> $DIR/fn_to_numeric_cast.rs:17:13
53    |
54 17 |     let _ = foo as u32;
55    |             ^^^^^^^^^^ help: try: `foo as usize`
56
57 error: casting function pointer `foo` to `u64`
58   --> $DIR/fn_to_numeric_cast.rs:18:13
59    |
60 18 |     let _ = foo as u64;
61    |             ^^^^^^^^^^ help: try: `foo as usize`
62
63 error: casting function pointer `foo` to `u128`
64   --> $DIR/fn_to_numeric_cast.rs:19:13
65    |
66 19 |     let _ = foo as u128;
67    |             ^^^^^^^^^^^ help: try: `foo as usize`
68
69 error: casting function pointer `abc` to `i8`
70   --> $DIR/fn_to_numeric_cast.rs:28:13
71    |
72 28 |     let _ = abc as i8;
73    |             ^^^^^^^^^ help: try: `abc as usize`
74
75 error: casting function pointer `abc` to `i16`
76   --> $DIR/fn_to_numeric_cast.rs:29:13
77    |
78 29 |     let _ = abc as i16;
79    |             ^^^^^^^^^^ help: try: `abc as usize`
80
81 error: casting function pointer `abc` to `i32`
82   --> $DIR/fn_to_numeric_cast.rs:30:13
83    |
84 30 |     let _ = abc as i32;
85    |             ^^^^^^^^^^ help: try: `abc as usize`
86
87 error: casting function pointer `abc` to `i64`
88   --> $DIR/fn_to_numeric_cast.rs:31:13
89    |
90 31 |     let _ = abc as i64;
91    |             ^^^^^^^^^^ help: try: `abc as usize`
92
93 error: casting function pointer `abc` to `i128`
94   --> $DIR/fn_to_numeric_cast.rs:32:13
95    |
96 32 |     let _ = abc as i128;
97    |             ^^^^^^^^^^^ help: try: `abc as usize`
98
99 error: casting function pointer `abc` to `isize`
100   --> $DIR/fn_to_numeric_cast.rs:33:13
101    |
102 33 |     let _ = abc as isize;
103    |             ^^^^^^^^^^^^ help: try: `abc as usize`
104
105 error: casting function pointer `abc` to `u8`
106   --> $DIR/fn_to_numeric_cast.rs:35:13
107    |
108 35 |     let _ = abc as u8;
109    |             ^^^^^^^^^ help: try: `abc as usize`
110
111 error: casting function pointer `abc` to `u16`
112   --> $DIR/fn_to_numeric_cast.rs:36:13
113    |
114 36 |     let _ = abc as u16;
115    |             ^^^^^^^^^^ help: try: `abc as usize`
116
117 error: casting function pointer `abc` to `u32`
118   --> $DIR/fn_to_numeric_cast.rs:37:13
119    |
120 37 |     let _ = abc as u32;
121    |             ^^^^^^^^^^ help: try: `abc as usize`
122
123 error: casting function pointer `abc` to `u64`
124   --> $DIR/fn_to_numeric_cast.rs:38:13
125    |
126 38 |     let _ = abc as u64;
127    |             ^^^^^^^^^^ help: try: `abc as usize`
128
129 error: casting function pointer `abc` to `u128`
130   --> $DIR/fn_to_numeric_cast.rs:39:13
131    |
132 39 |     let _ = abc as u128;
133    |             ^^^^^^^^^^^ help: try: `abc as usize`
134
135 error: casting function pointer `f` to `i32`
136   --> $DIR/fn_to_numeric_cast.rs:46:5
137    |
138 46 |     f as i32
139    |     ^^^^^^^^ help: try: `f as usize`
140
141 error: aborting due to 23 previous errors
142