Auto merge of #1775 - ABouttefeux:master, r=RalfJung
Fix failing test after merge of PR rust#83948 Cc https://github.com/rust-lang/rust/issues/84202
This commit is contained in:
commit
b13b79db73
@ -1 +1 @@
|
||||
481598b26db6144c580dc113f4d78b4151b5a1bc
|
||||
043d9160769a330df5d8a21e846785e2c89f357d
|
||||
|
@ -1,3 +1,4 @@
|
||||
#[allow(deref_nullptr)]
|
||||
fn main() {
|
||||
let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR inbounds test failed: 0x0 is not a valid pointer
|
||||
panic!("this should never print: {}", x);
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Some optimizations remove ZST accesses, thus masking this UB.
|
||||
// compile-flags: -Zmir-opt-level=0
|
||||
|
||||
#[allow(deref_nullptr)]
|
||||
fn main() {
|
||||
let x: () = unsafe { *std::ptr::null() }; //~ ERROR memory access failed: 0x0 is not a valid pointer
|
||||
panic!("this should never print: {:?}", x);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#[allow(deref_nullptr)]
|
||||
fn main() {
|
||||
unsafe { *std::ptr::null_mut() = 0i32 }; //~ ERROR inbounds test failed: 0x0 is not a valid pointer
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Some optimizations remove ZST accesses, thus masking this UB.
|
||||
// compile-flags: -Zmir-opt-level=0
|
||||
|
||||
#[allow(deref_nullptr)]
|
||||
fn main() {
|
||||
// Not using the () type here, as writes of that type do not even have MIR generated.
|
||||
// Also not assigning directly as that's array initialization, not assignment.
|
||||
|
Loading…
x
Reference in New Issue
Block a user