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