Update MIRI compiletests
This commit is contained in:
parent
5292d48b85
commit
3456f77241
2 changed files with 3 additions and 3 deletions
|
@ -7,5 +7,5 @@ fn main() {
|
|||
// Also not assigning directly as that's array initialization, not assignment.
|
||||
let zst_val = [1u8; 0];
|
||||
unsafe { std::ptr::null_mut::<[u8; 0]>().write(zst_val) };
|
||||
//~^ERROR: memory access failed: null pointer is a dangling pointer
|
||||
//~^ERROR: dereferencing pointer failed: null pointer is a dangling pointer
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error: Undefined Behavior: memory access failed: null pointer is a dangling pointer (it has no provenance)
|
||||
error: Undefined Behavior: dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
|
||||
--> $DIR/null_pointer_write_zst.rs:LL:CC
|
||||
|
|
||||
LL | unsafe { std::ptr::null_mut::<[u8; 0]>().write(zst_val) };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: null pointer is a dangling pointer (it has no provenance)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
Loading…
Add table
Reference in a new issue