1- error: casting `*const U` as `*const V` is invalid
1+ error[E0606] : casting `*const U` as `*const V` is invalid
22 --> $DIR/cast-rfc0401.rs:13:5
33 |
4413 | u as *const V
55 | ^^^^^^^^^^^^^
66 |
77 = note: vtable kinds may not match
88
9- error: casting `*const U` as `*const str` is invalid
9+ error[E0606] : casting `*const U` as `*const str` is invalid
1010 --> $DIR/cast-rfc0401.rs:18:5
1111 |
121218 | u as *const str
@@ -60,27 +60,27 @@ error[E0605]: non-scalar cast: `std::option::Option<&*const u8>` as `*const u8`
6060 |
6161 = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
6262
63- error: casting `*const u8` as `f32` is invalid
63+ error[E0606] : casting `*const u8` as `f32` is invalid
6464 --> $DIR/cast-rfc0401.rs:45:13
6565 |
666645 | let _ = v as f32;
6767 | ^^^^^^^^
6868
69- error: casting `fn() {main}` as `f64` is invalid
69+ error[E0606] : casting `fn() {main}` as `f64` is invalid
7070 --> $DIR/cast-rfc0401.rs:46:13
7171 |
727246 | let _ = main as f64;
7373 | ^^^^^^^^^^^
7474
75- error: casting `&*const u8` as `usize` is invalid
75+ error[E0606] : casting `&*const u8` as `usize` is invalid
7676 --> $DIR/cast-rfc0401.rs:47:13
7777 |
787847 | let _ = &v as usize;
7979 | ^^^^^^^^^^^
8080 |
8181 = help: cast through a raw pointer first
8282
83- error: casting `f32` as `*const u8` is invalid
83+ error[E0606] : casting `f32` as `*const u8` is invalid
8484 --> $DIR/cast-rfc0401.rs:48:13
8585 |
868648 | let _ = f as *const u8;
@@ -108,49 +108,49 @@ error[E0604]: only `u8` can be cast as `char`, not `u32`
10810851 | let _ = 0x61u32 as char;
109109 | ^^^^^^^^^^^^^^^
110110
111- error: casting `bool` as `f32` is invalid
111+ error[E0606] : casting `bool` as `f32` is invalid
112112 --> $DIR/cast-rfc0401.rs:53:13
113113 |
11411453 | let _ = false as f32;
115115 | ^^^^^^^^^^^^
116116 |
117117 = help: cast through an integer first
118118
119- error: casting `E` as `f32` is invalid
119+ error[E0606] : casting `E` as `f32` is invalid
120120 --> $DIR/cast-rfc0401.rs:54:13
121121 |
12212254 | let _ = E::A as f32;
123123 | ^^^^^^^^^^^
124124 |
125125 = help: cast through an integer first
126126
127- error: casting `char` as `f32` is invalid
127+ error[E0606] : casting `char` as `f32` is invalid
128128 --> $DIR/cast-rfc0401.rs:55:13
129129 |
13013055 | let _ = 'a' as f32;
131131 | ^^^^^^^^^^
132132 |
133133 = help: cast through an integer first
134134
135- error: casting `bool` as `*const u8` is invalid
135+ error[E0606] : casting `bool` as `*const u8` is invalid
136136 --> $DIR/cast-rfc0401.rs:57:13
137137 |
13813857 | let _ = false as *const u8;
139139 | ^^^^^^^^^^^^^^^^^^
140140
141- error: casting `E` as `*const u8` is invalid
141+ error[E0606] : casting `E` as `*const u8` is invalid
142142 --> $DIR/cast-rfc0401.rs:58:13
143143 |
14414458 | let _ = E::A as *const u8;
145145 | ^^^^^^^^^^^^^^^^^
146146
147- error: casting `char` as `*const u8` is invalid
147+ error[E0606] : casting `char` as `*const u8` is invalid
148148 --> $DIR/cast-rfc0401.rs:59:13
149149 |
15015059 | let _ = 'a' as *const u8;
151151 | ^^^^^^^^^^^^^^^^
152152
153- error: casting `usize` as `*const [u8]` is invalid
153+ error[E0606] : casting `usize` as `*const [u8]` is invalid
154154 --> $DIR/cast-rfc0401.rs:61:13
155155 |
15615661 | let _ = 42usize as *const [u8];
@@ -162,53 +162,53 @@ error: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]`
16216262 | let _ = v as *const [u8];
163163 | ^^^^^^^^^^^^^^^^
164164
165- error: casting `&Foo` as `*const str` is invalid
165+ error[E0606] : casting `&Foo` as `*const str` is invalid
166166 --> $DIR/cast-rfc0401.rs:64:13
167167 |
16816864 | let _ = foo as *const str;
169169 | ^^^^^^^^^^^^^^^^^
170170
171- error: casting `&Foo` as `*mut str` is invalid
171+ error[E0606] : casting `&Foo` as `*mut str` is invalid
172172 --> $DIR/cast-rfc0401.rs:65:13
173173 |
17417465 | let _ = foo as *mut str;
175175 | ^^^^^^^^^^^^^^^
176176
177- error: casting `fn() {main}` as `*mut str` is invalid
177+ error[E0606] : casting `fn() {main}` as `*mut str` is invalid
178178 --> $DIR/cast-rfc0401.rs:66:13
179179 |
18018066 | let _ = main as *mut str;
181181 | ^^^^^^^^^^^^^^^^
182182
183- error: casting `&f32` as `*mut f32` is invalid
183+ error[E0606] : casting `&f32` as `*mut f32` is invalid
184184 --> $DIR/cast-rfc0401.rs:67:13
185185 |
18618667 | let _ = &f as *mut f32;
187187 | ^^^^^^^^^^^^^^
188188
189- error: casting `&f32` as `*const f64` is invalid
189+ error[E0606] : casting `&f32` as `*const f64` is invalid
190190 --> $DIR/cast-rfc0401.rs:68:13
191191 |
19219268 | let _ = &f as *const f64;
193193 | ^^^^^^^^^^^^^^^^
194194
195- error: casting `*const [i8]` as `usize` is invalid
195+ error[E0606] : casting `*const [i8]` as `usize` is invalid
196196 --> $DIR/cast-rfc0401.rs:69:13
197197 |
19819869 | let _ = fat_sv as usize;
199199 | ^^^^^^^^^^^^^^^
200200 |
201201 = help: cast through a thin pointer first
202202
203- error: casting `*const Foo` as `*const [u16]` is invalid
203+ error[E0606] : casting `*const Foo` as `*const [u16]` is invalid
204204 --> $DIR/cast-rfc0401.rs:78:13
205205 |
20620678 | let _ = cf as *const [u16];
207207 | ^^^^^^^^^^^^^^^^^^
208208 |
209209 = note: vtable kinds may not match
210210
211- error: casting `*const Foo` as `*const Bar` is invalid
211+ error[E0606] : casting `*const Foo` as `*const Bar` is invalid
212212 --> $DIR/cast-rfc0401.rs:79:13
213213 |
21421479 | let _ = cf as *const Bar;
@@ -234,7 +234,7 @@ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
234234 = help: the trait `std::marker::Sized` is not implemented for `str`
235235 = note: required for the cast to the object type `Foo`
236236
237- error: casting `&{float}` as `f32` is invalid
237+ error[E0606] : casting `&{float}` as `f32` is invalid
238238 --> $DIR/cast-rfc0401.rs:81:30
239239 |
24024081 | vec![0.0].iter().map(|s| s as f32).collect::<Vec<f32>>();
0 commit comments