miri: fixup for allowing &raw UNSAFE_STATIC
This commit is contained in:
parent
bf454afcaa
commit
b3cd9b5cd3
@ -5,5 +5,5 @@ extern "C" {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _val = unsafe { std::ptr::addr_of!(FOO) }; //~ ERROR: is not supported by Miri
|
||||
let _val = std::ptr::addr_of!(FOO); //~ ERROR: is not supported by Miri
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
error: unsupported operation: extern static `FOO` is not supported by Miri
|
||||
--> $DIR/extern_static.rs:LL:CC
|
||||
|
|
||||
LL | let _val = unsafe { std::ptr::addr_of!(FOO) };
|
||||
| ^^^ extern static `FOO` is not supported by Miri
|
||||
LL | let _val = std::ptr::addr_of!(FOO);
|
||||
| ^^^ extern static `FOO` is not supported by Miri
|
||||
|
|
||||
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
|
||||
= note: BACKTRACE:
|
||||
|
@ -2,7 +2,7 @@ use std::ptr::addr_of;
|
||||
|
||||
static mut FOO: i32 = 42;
|
||||
|
||||
static BAR: Foo = Foo(unsafe { addr_of!(FOO) });
|
||||
static BAR: Foo = Foo(addr_of!(FOO));
|
||||
|
||||
#[allow(dead_code)]
|
||||
struct Foo(*const i32);
|
||||
|
Loading…
x
Reference in New Issue
Block a user