Skip to content

Commit d11e388

Browse files
committed
Auto merge of rust-lang#131662 - matthiaskrgr:rollup-r1wkfxw, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#130356 (don't warn about a missing change-id in CI) - rust-lang#130900 (Do not output () on empty description) - rust-lang#131066 (Add the Chinese translation entry to the RustByExample build process) - rust-lang#131067 (Fix std_detect links) - rust-lang#131644 (Clean up some Miri things in `sys/windows`) - rust-lang#131646 (sys/unix: add comments for some Miri fallbacks) - rust-lang#131653 (Remove const trait bound modifier hack) - rust-lang#131659 (enable `download_ci_llvm` test) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 9c1e162 + da6c63c commit d11e388

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

std/src/sys/pal/unix/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ impl DirEntry {
899899
target_os = "android",
900900
target_os = "hurd"
901901
),
902-
not(miri)
902+
not(miri) // no dirfd on Miri
903903
))]
904904
pub fn metadata(&self) -> io::Result<FileAttr> {
905905
let fd = cvt(unsafe { dirfd(self.dir.dirp.0) })?;

std/src/sys/pal/windows/c.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ extern "system" {
175175
pub fn WakeByAddressAll(address: *const c_void);
176176
}
177177

178+
// These are loaded by `load_synch_functions`.
178179
#[cfg(target_vendor = "win7")]
179180
compat_fn_optional! {
180-
crate::sys::compat::load_synch_functions();
181181
pub fn WaitOnAddress(
182182
address: *const c_void,
183183
compareaddress: *const c_void,

std/src/sys/pal/windows/compat.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,10 @@ macro_rules! compat_fn_with_fallback {
198198

199199
/// Optionally loaded functions.
200200
///
201-
/// Actual loading of the function defers to $load_functions.
201+
/// Relies on the functions being pre-loaded elsewhere.
202202
#[cfg(target_vendor = "win7")]
203203
macro_rules! compat_fn_optional {
204-
($load_functions:expr;
205-
$(
204+
($(
206205
$(#[$meta:meta])*
207206
$vis:vis fn $symbol:ident($($argname:ident: $argtype:ty),*) $(-> $rettype:ty)?;
208207
)+) => (
@@ -221,9 +220,6 @@ macro_rules! compat_fn_optional {
221220

222221
#[inline(always)]
223222
pub fn option() -> Option<F> {
224-
// Miri does not understand the way we do preloading
225-
// therefore load the function here instead.
226-
#[cfg(miri)] $load_functions;
227223
NonNull::new(PTR.load(Ordering::Relaxed)).map(|f| unsafe { mem::transmute(f) })
228224
}
229225
}

std/src/sys/pal/windows/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,6 @@ pub fn abort_internal() -> ! {
346346
}
347347
}
348348

349-
// miri is sensitive to changes here so check that miri is happy if touching this
350349
#[cfg(miri)]
351350
pub fn abort_internal() -> ! {
352351
crate::intrinsics::abort();

std/src/sys/sync/thread_parking/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ cfg_if::cfg_if! {
2323
mod windows7;
2424
pub use windows7::Parker;
2525
} else if #[cfg(all(target_vendor = "apple", not(miri)))] {
26+
// Doesn't work in Miri, see <https://github.com/rust-lang/miri/issues/2589>.
2627
mod darwin;
2728
pub use darwin::Parker;
2829
} else if #[cfg(target_os = "xous")] {

0 commit comments

Comments
 (0)