Skip to content

Commit a012e92

Browse files
committed
sys/windows: remove miri hack that is only needed for win7
1 parent ecf2d1f commit a012e92

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ extern "system" {
177177

178178
#[cfg(target_vendor = "win7")]
179179
compat_fn_optional! {
180-
crate::sys::compat::load_synch_functions();
181180
pub fn WaitOnAddress(
182181
address: *const c_void,
183182
compareaddress: *const c_void,

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

Lines changed: 2 additions & 6 deletions
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
}

0 commit comments

Comments
 (0)