@@ -85,49 +85,49 @@ LL | let _a: A = std::ptr::replace(std::ptr::null_mut(), A);
8585 | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
8686
8787error: pointer must be non-null
88- --> tests/ui/invalid_null_ptr_usage.rs:28 :29
88+ --> tests/ui/invalid_null_ptr_usage.rs:30 :29
8989 |
9090LL | std::ptr::swap::<A>(std::ptr::null_mut(), &mut A);
9191 | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
9292
9393error: pointer must be non-null
94- --> tests/ui/invalid_null_ptr_usage.rs:29 :37
94+ --> tests/ui/invalid_null_ptr_usage.rs:31 :37
9595 |
9696LL | std::ptr::swap::<A>(&mut A, std::ptr::null_mut());
9797 | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
9898
9999error: pointer must be non-null
100- --> tests/ui/invalid_null_ptr_usage.rs:31 :44
100+ --> tests/ui/invalid_null_ptr_usage.rs:33 :44
101101 |
102102LL | std::ptr::swap_nonoverlapping::<A>(std::ptr::null_mut(), &mut A, 0);
103103 | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
104104
105105error: pointer must be non-null
106- --> tests/ui/invalid_null_ptr_usage.rs:32 :52
106+ --> tests/ui/invalid_null_ptr_usage.rs:34 :52
107107 |
108108LL | std::ptr::swap_nonoverlapping::<A>(&mut A, std::ptr::null_mut(), 0);
109109 | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
110110
111111error: pointer must be non-null
112- --> tests/ui/invalid_null_ptr_usage.rs:34 :25
112+ --> tests/ui/invalid_null_ptr_usage.rs:36 :25
113113 |
114114LL | std::ptr::write(std::ptr::null_mut(), A);
115115 | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
116116
117117error: pointer must be non-null
118- --> tests/ui/invalid_null_ptr_usage.rs:36 :35
118+ --> tests/ui/invalid_null_ptr_usage.rs:38 :35
119119 |
120120LL | std::ptr::write_unaligned(std::ptr::null_mut(), A);
121121 | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
122122
123123error: pointer must be non-null
124- --> tests/ui/invalid_null_ptr_usage.rs:38 :34
124+ --> tests/ui/invalid_null_ptr_usage.rs:40 :34
125125 |
126126LL | std::ptr::write_volatile(std::ptr::null_mut(), A);
127127 | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
128128
129129error: pointer must be non-null
130- --> tests/ui/invalid_null_ptr_usage.rs:40 :40
130+ --> tests/ui/invalid_null_ptr_usage.rs:42 :40
131131 |
132132LL | std::ptr::write_bytes::<usize>(std::ptr::null_mut(), 42, 0);
133133 | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
0 commit comments