From d6efeadb06733a04479bfe57db897712440222be Mon Sep 17 00:00:00 2001 From: joboet Date: Thu, 11 Jan 2024 20:26:20 +0100 Subject: [PATCH] std: fix module references on Windows --- library/std/src/sys/pal/windows/args.rs | 4 ++-- library/std/src/sys/pal/windows/args/tests.rs | 2 +- library/std/src/sys/pal/windows/locks/condvar.rs | 2 +- library/std/src/sys/pal/windows/stdio.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/std/src/sys/pal/windows/args.rs b/library/std/src/sys/pal/windows/args.rs index ee7dba6e5b3..fbbdbc21265 100644 --- a/library/std/src/sys/pal/windows/args.rs +++ b/library/std/src/sys/pal/windows/args.rs @@ -6,6 +6,7 @@ #[cfg(test)] mod tests; +use super::os::current_exe; use crate::ffi::OsString; use crate::fmt; use crate::io; @@ -14,7 +15,6 @@ use crate::path::{Path, PathBuf}; use crate::sys::path::get_long_path; use crate::sys::process::ensure_no_nuls; -use crate::sys::windows::os::current_exe; use crate::sys::{c, to_u16s}; use crate::sys_common::wstr::WStrUnits; use crate::vec; @@ -318,8 +318,8 @@ pub(crate) fn to_user_path(path: &Path) -> io::Result> { from_wide_to_user_path(to_u16s(path)?) } pub(crate) fn from_wide_to_user_path(mut path: Vec) -> io::Result> { + use super::fill_utf16_buf; use crate::ptr; - use crate::sys::windows::fill_utf16_buf; // UTF-16 encoded code points, used in parsing and building UTF-16 paths. // All of these are in the ASCII range so they can be cast directly to `u16`. diff --git a/library/std/src/sys/pal/windows/args/tests.rs b/library/std/src/sys/pal/windows/args/tests.rs index 82c32d08c5e..484a90ab056 100644 --- a/library/std/src/sys/pal/windows/args/tests.rs +++ b/library/std/src/sys/pal/windows/args/tests.rs @@ -1,5 +1,5 @@ +use super::*; use crate::ffi::OsString; -use crate::sys::windows::args::*; fn chk(string: &str, parts: &[&str]) { let mut wide: Vec = OsString::from(string).encode_wide().collect(); diff --git a/library/std/src/sys/pal/windows/locks/condvar.rs b/library/std/src/sys/pal/windows/locks/condvar.rs index 66fafa2c00b..953bcc27dee 100644 --- a/library/std/src/sys/pal/windows/locks/condvar.rs +++ b/library/std/src/sys/pal/windows/locks/condvar.rs @@ -27,7 +27,7 @@ pub unsafe fn wait_timeout(&self, mutex: &Mutex, dur: Duration) -> bool { let r = c::SleepConditionVariableSRW( self.inner.get(), mutex::raw(mutex), - crate::sys::windows::dur2timeout(dur), + crate::sys::pal::windows::dur2timeout(dur), 0, ); if r == 0 { diff --git a/library/std/src/sys/pal/windows/stdio.rs b/library/std/src/sys/pal/windows/stdio.rs index 819a48266d9..96c23f82aec 100644 --- a/library/std/src/sys/pal/windows/stdio.rs +++ b/library/std/src/sys/pal/windows/stdio.rs @@ -1,5 +1,6 @@ #![unstable(issue = "none", feature = "windows_stdio")] +use super::api; use crate::cmp; use crate::io; use crate::mem::MaybeUninit; @@ -9,7 +10,6 @@ use crate::sys::c; use crate::sys::cvt; use crate::sys::handle::Handle; -use crate::sys::windows::api; use core::str::utf8_char_width; #[cfg(test)]