diff options
| author | bors <bors@rust-lang.org> | 2024-04-19 05:38:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-19 05:38:13 +0000 |
| commit | 0ed85d0c8d225b4eac2085dc11d89b4e7455175a (patch) | |
| tree | 95590b78726ee19dcc1f2ade18b9d6ddc7b28e74 /library/std/src | |
| parent | 13e63f7490109eecf905fa51190eacbe8051aefd (diff) | |
| parent | c8d58faba29805c499eb121ba6359b1284c8f293 (diff) | |
| download | rust-0ed85d0c8d225b4eac2085dc11d89b4e7455175a.tar.gz rust-0ed85d0c8d225b4eac2085dc11d89b4e7455175a.zip | |
Auto merge of #124147 - workingjubilee:rollup-7pjnzr6, r=workingjubilee
Rollup of 7 pull requests Successful merges: - #123406 (Force exhaustion in iter::ArrayChunks::into_remainder) - #123752 (Properly handle emojis as literal prefix in macros) - #123935 (Don't inline integer literals when they overflow - new attempt) - #123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc) - #124019 (Use raw-dylib for Windows synchronization functions) - #124110 (Fix negating `f16` and `f128` constants) - #124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/panicking.rs | 7 | ||||
| -rw-r--r-- | library/std/src/sys/pal/windows/c.rs | 14 |
2 files changed, 20 insertions, 1 deletions
diff --git a/library/std/src/panicking.rs b/library/std/src/panicking.rs index 0052fcbb94a..5699937cdb4 100644 --- a/library/std/src/panicking.rs +++ b/library/std/src/panicking.rs @@ -277,6 +277,13 @@ fn default_hook(info: &PanicInfo<'_>) { "note: run with `RUST_BACKTRACE=1` environment variable to display a \ backtrace" ); + if cfg!(miri) { + let _ = writeln!( + err, + "note: in Miri, you may have to set `-Zmiri-env-forward=RUST_BACKTRACE` \ + for the environment variable to have an effect" + ); + } } } // If backtraces aren't supported or are forced-off, do nothing. diff --git a/library/std/src/sys/pal/windows/c.rs b/library/std/src/sys/pal/windows/c.rs index 1c828bac4b6..9d58ce05f01 100644 --- a/library/std/src/sys/pal/windows/c.rs +++ b/library/std/src/sys/pal/windows/c.rs @@ -357,7 +357,19 @@ compat_fn_with_fallback! { } #[cfg(not(target_vendor = "win7"))] -#[link(name = "synchronization")] +// Use raw-dylib to import synchronization functions to workaround issues with the older mingw import library. +#[cfg_attr( + target_arch = "x86", + link( + name = "api-ms-win-core-synch-l1-2-0", + kind = "raw-dylib", + import_name_type = "undecorated" + ) +)] +#[cfg_attr( + not(target_arch = "x86"), + link(name = "api-ms-win-core-synch-l1-2-0", kind = "raw-dylib") +)] extern "system" { pub fn WaitOnAddress( address: *const c_void, |
