@@ -85,49 +85,49 @@ LL | let _a: A = std::ptr::replace(std::ptr::null_mut(), A);
85
85
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
86
86
87
87
error: 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
89
89
|
90
90
LL | std::ptr::swap::<A>(std::ptr::null_mut(), &mut A);
91
91
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
92
92
93
93
error: 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
95
95
|
96
96
LL | std::ptr::swap::<A>(&mut A, std::ptr::null_mut());
97
97
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
98
98
99
99
error: 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
101
101
|
102
102
LL | std::ptr::swap_nonoverlapping::<A>(std::ptr::null_mut(), &mut A, 0);
103
103
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
104
104
105
105
error: 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
107
107
|
108
108
LL | std::ptr::swap_nonoverlapping::<A>(&mut A, std::ptr::null_mut(), 0);
109
109
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
110
110
111
111
error: 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
113
113
|
114
114
LL | std::ptr::write(std::ptr::null_mut(), A);
115
115
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
116
116
117
117
error: 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
119
119
|
120
120
LL | std::ptr::write_unaligned(std::ptr::null_mut(), A);
121
121
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
122
122
123
123
error: 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
125
125
|
126
126
LL | std::ptr::write_volatile(std::ptr::null_mut(), A);
127
127
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
128
128
129
129
error: 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
131
131
|
132
132
LL | std::ptr::write_bytes::<usize>(std::ptr::null_mut(), 42, 0);
133
133
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()`
0 commit comments