You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/lint/invalid_null_args.stderr
+12-52Lines changed: 12 additions & 52 deletions
Original file line number
Diff line number
Diff line change
@@ -166,26 +166,6 @@ LL | let _a: A = ptr::read_unaligned(ptr::null_mut());
166
166
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
167
167
--> $DIR/invalid_null_args.rs:61:17
168
168
|
169
-
LL | let _a: A = ptr::read_volatile(ptr::null());
170
-
| ^^^^^^^^^^^^^^^^^^^-----------^
171
-
| |
172
-
| null pointer originates from here
173
-
|
174
-
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
175
-
176
-
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
177
-
--> $DIR/invalid_null_args.rs:63:17
178
-
|
179
-
LL | let _a: A = ptr::read_volatile(ptr::null_mut());
180
-
| ^^^^^^^^^^^^^^^^^^^---------------^
181
-
| |
182
-
| null pointer originates from here
183
-
|
184
-
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
185
-
186
-
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
187
-
--> $DIR/invalid_null_args.rs:66:17
188
-
|
189
169
LL | let _a: A = ptr::replace(ptr::null_mut(), v);
190
170
| ^^^^^^^^^^^^^---------------^^^^
191
171
| |
@@ -194,7 +174,7 @@ LL | let _a: A = ptr::replace(ptr::null_mut(), v);
194
174
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
195
175
196
176
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
205
185
206
186
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
215
195
216
196
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
225
205
226
206
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
235
215
236
216
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
245
225
246
226
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
255
235
256
236
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
257
-
--> $DIR/invalid_null_args.rs:85:5
258
-
|
259
-
LL | ptr::write_volatile(ptr::null_mut(), v);
260
-
| ^^^^^^^^^^^^^^^^^^^^---------------^^^^
261
-
| |
262
-
| null pointer originates from here
263
-
|
264
-
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
265
-
266
-
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
275
-
276
-
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
277
-
--> $DIR/invalid_null_args.rs:93:18
237
+
--> $DIR/invalid_null_args.rs:82:18
278
238
|
279
239
LL | let _a: u8 = ptr::read(const_ptr);
280
240
| ^^^^^^^^^^^^^^^^^^^^
@@ -287,7 +247,7 @@ LL | let null_ptr = ptr::null_mut();
287
247
| ^^^^^^^^^^^^^^^
288
248
289
249
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
298
258
299
259
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
308
268
309
269
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
318
278
319
279
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
= help: for more information, visit <https://doc.rust-lang.org/std/ptr/index.html> and <https://doc.rust-lang.org/reference/behavior-considered-undefined.html>
0 commit comments