Skip to content

Commit

Permalink
Auto merge of rust-lang#131662 - matthiaskrgr:rollup-r1wkfxw, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

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
  • Loading branch information
bors committed Oct 13, 2024
2 parents 9c1e162 + da6c63c commit d11e388
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion std/src/sys/pal/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ impl DirEntry {
target_os = "android",
target_os = "hurd"
),
not(miri)
not(miri) // no dirfd on Miri
))]
pub fn metadata(&self) -> io::Result<FileAttr> {
let fd = cvt(unsafe { dirfd(self.dir.dirp.0) })?;
Expand Down
2 changes: 1 addition & 1 deletion std/src/sys/pal/windows/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ extern "system" {
pub fn WakeByAddressAll(address: *const c_void);
}

// These are loaded by `load_synch_functions`.
#[cfg(target_vendor = "win7")]
compat_fn_optional! {
crate::sys::compat::load_synch_functions();
pub fn WaitOnAddress(
address: *const c_void,
compareaddress: *const c_void,
Expand Down
8 changes: 2 additions & 6 deletions std/src/sys/pal/windows/compat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,10 @@ macro_rules! compat_fn_with_fallback {

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

#[inline(always)]
pub fn option() -> Option<F> {
// Miri does not understand the way we do preloading
// therefore load the function here instead.
#[cfg(miri)] $load_functions;
NonNull::new(PTR.load(Ordering::Relaxed)).map(|f| unsafe { mem::transmute(f) })
}
}
Expand Down
1 change: 0 additions & 1 deletion std/src/sys/pal/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ pub fn abort_internal() -> ! {
}
}

// miri is sensitive to changes here so check that miri is happy if touching this
#[cfg(miri)]
pub fn abort_internal() -> ! {
crate::intrinsics::abort();
Expand Down
1 change: 1 addition & 0 deletions std/src/sys/sync/thread_parking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ cfg_if::cfg_if! {
mod windows7;
pub use windows7::Parker;
} else if #[cfg(all(target_vendor = "apple", not(miri)))] {
// Doesn't work in Miri, see <https://github.com/rust-lang/miri/issues/2589>.
mod darwin;
pub use darwin::Parker;
} else if #[cfg(target_os = "xous")] {
Expand Down

0 comments on commit d11e388

Please sign in to comment.