Skip to content

Commit 68ec93d

Browse files
committed
Auto merge of #128093 - matthiaskrgr:rollup-1snye4b, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #125834 (treat `&raw (const|mut) UNSAFE_STATIC` implied deref as safe) - #127962 (Cleanup compiletest dylib name calculation) - #128049 (Reword E0626 to mention static coroutine, add structured suggestion for adding `static`) - #128067 (Get rid of `can_eq_shallow`) - #128076 (Get rid of `InferCtxtExt` from `error_reporting::traits`) - #128089 (std: Unsafe-wrap actually-universal platform code) r? `@ghost` `@rustbot` modify labels: rollup
2 parents c27e65c + 56b13ea commit 68ec93d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/fail/extern_static.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ extern "C" {
55
}
66

77
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
99
}

tests/fail/extern_static.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error: 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:

tests/pass/static_mut.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::ptr::addr_of;
22

33
static 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)]
88
struct Foo(*const i32);

0 commit comments

Comments
 (0)