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