@@ -200,70 +200,88 @@ LL | f(&mut std::array::from_fn(|i| i * i) as *mut [usize; 9]);
200200 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_mut::<[usize; 9]>(&mut std::array::from_fn(|i| i * i))`
201201
202202error: reference as raw pointer
203- --> tests/ui/ref_as_ptr.rs:109:7
203+ --> tests/ui/ref_as_ptr.rs:90:13
204+ |
205+ LL | let _ = &x as *const _;
206+ | ^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref(&x)`
207+
208+ error: reference as raw pointer
209+ --> tests/ui/ref_as_ptr.rs:92:13
210+ |
211+ LL | let _ = &x.0 as *const _;
212+ | ^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref(&x.0)`
213+
214+ error: reference as raw pointer
215+ --> tests/ui/ref_as_ptr.rs:96:13
216+ |
217+ LL | let _ = &*x as *const _;
218+ | ^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref(&*x)`
219+
220+ error: reference as raw pointer
221+ --> tests/ui/ref_as_ptr.rs:119:7
204222 |
205223LL | f(val as *const i32);
206224 | ^^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref::<i32>(val)`
207225
208226error: reference as raw pointer
209- --> tests/ui/ref_as_ptr.rs:111 :7
227+ --> tests/ui/ref_as_ptr.rs:121 :7
210228 |
211229LL | f(mut_val as *mut i32);
212230 | ^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_mut::<i32>(mut_val)`
213231
214232error: reference as raw pointer
215- --> tests/ui/ref_as_ptr.rs:116 :7
233+ --> tests/ui/ref_as_ptr.rs:126 :7
216234 |
217235LL | f(val as *const _);
218236 | ^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref(val)`
219237
220238error: reference as raw pointer
221- --> tests/ui/ref_as_ptr.rs:118 :7
239+ --> tests/ui/ref_as_ptr.rs:128 :7
222240 |
223241LL | f(val as *const [u8]);
224242 | ^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref::<[u8]>(val)`
225243
226244error: reference as raw pointer
227- --> tests/ui/ref_as_ptr.rs:123 :7
245+ --> tests/ui/ref_as_ptr.rs:133 :7
228246 |
229247LL | f(val as *mut _);
230248 | ^^^^^^^^^^^^^ help: try: `std::ptr::from_mut(val)`
231249
232250error: reference as raw pointer
233- --> tests/ui/ref_as_ptr.rs:125 :7
251+ --> tests/ui/ref_as_ptr.rs:135 :7
234252 |
235253LL | f(val as *mut str);
236254 | ^^^^^^^^^^^^^^^ help: try: `std::ptr::from_mut::<str>(val)`
237255
238256error: reference as raw pointer
239- --> tests/ui/ref_as_ptr.rs:133 :9
257+ --> tests/ui/ref_as_ptr.rs:143 :9
240258 |
241259LL | self.0 as *const _ as *const _
242260 | ^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref(self.0)`
243261
244262error: reference as raw pointer
245- --> tests/ui/ref_as_ptr.rs:138 :9
263+ --> tests/ui/ref_as_ptr.rs:148 :9
246264 |
247265LL | self.0 as *const _ as *const _
248266 | ^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref(self.0)`
249267
250268error: reference as raw pointer
251- --> tests/ui/ref_as_ptr.rs:147 :9
269+ --> tests/ui/ref_as_ptr.rs:157 :9
252270 |
253271LL | self.0 as *const _ as *const _
254272 | ^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref(self.0)`
255273
256274error: reference as raw pointer
257- --> tests/ui/ref_as_ptr.rs:152 :9
275+ --> tests/ui/ref_as_ptr.rs:162 :9
258276 |
259277LL | self.0 as *const _ as *const _
260278 | ^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref(self.0)`
261279
262280error: reference as raw pointer
263- --> tests/ui/ref_as_ptr.rs:157 :9
281+ --> tests/ui/ref_as_ptr.rs:167 :9
264282 |
265283LL | self.0 as *mut _ as *mut _
266284 | ^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_mut(self.0)`
267285
268- error: aborting due to 44 previous errors
286+ error: aborting due to 47 previous errors
269287
0 commit comments