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
+14-44Lines changed: 14 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -164,27 +164,7 @@ LL | let _a: A = ptr::read_unaligned(ptr::null_mut());
164
164
= 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>
165
165
166
166
error: calling this function with a null pointer is undefined behavior, even if the result of the function is unused
167
-
--> $DIR/invalid_null_args.rs:61:17
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
167
+
--> $DIR/invalid_null_args.rs:65:17
188
168
|
189
169
LL | let _a: A = ptr::replace(ptr::null_mut(), v);
190
170
| ^^^^^^^^^^^^^---------------^^^^
@@ -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
245
276
246
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
247
+
--> $DIR/invalid_null_args.rs:92:18
278
248
|
279
249
LL | let _a: u8 = ptr::read(const_ptr);
280
250
| ^^^^^^^^^^^^^^^^^^^^
@@ -287,7 +257,7 @@ LL | let null_ptr = ptr::null_mut();
287
257
| ^^^^^^^^^^^^^^^
288
258
289
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>
298
268
299
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>
308
278
309
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>
318
288
319
289
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