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