File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ extern "C" {
55}
66
77fn main ( ) {
8- let _val = unsafe { std:: ptr:: addr_of!( FOO ) } ; //~ ERROR: is not supported by Miri
8+ let _val = std:: ptr:: addr_of!( FOO ) ; //~ ERROR: is not supported by Miri
99}
Original file line number Diff line number Diff line change 11error: unsupported operation: extern static `FOO` is not supported by Miri
22 --> $DIR/extern_static.rs:LL:CC
33 |
4- LL | let _val = unsafe { std::ptr::addr_of!(FOO) } ;
5- | ^^^ extern static `FOO` is not supported by Miri
4+ LL | let _val = std::ptr::addr_of!(FOO);
5+ | ^^^ extern static `FOO` is not supported by Miri
66 |
77 = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
88 = note: BACKTRACE:
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use std::ptr::addr_of;
22
33static mut FOO : i32 = 42 ;
44
5- static BAR : Foo = Foo ( unsafe { addr_of ! ( FOO ) } ) ;
5+ static BAR : Foo = Foo ( addr_of ! ( FOO ) ) ;
66
77#[ allow( dead_code) ]
88struct Foo ( * const i32 ) ;
You can’t perform that action at this time.
0 commit comments