Skip to content

Commit dff680d

Browse files
authored
Rollup merge of #122386 - joboet:move_pal_once, r=jhpratt
Move `Once` implementations to `sys` Part of #117276.
2 parents a18a608 + 22a5267 commit dff680d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+22
-35
lines changed

.reuse/dep5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Copyright: 2019 The Crossbeam Project Developers
5252
The Rust Project Developers (see https://thanks.rust-lang.org)
5353
License: MIT OR Apache-2.0
5454

55-
Files: library/std/src/sys/locks/mutex/fuchsia.rs
55+
Files: library/std/src/sys/sync/mutex/fuchsia.rs
5656
Copyright: 2016 The Fuchsia Authors
5757
The Rust Project Developers (see https://thanks.rust-lang.org)
5858
License: BSD-2-Clause AND (MIT OR Apache-2.0)

library/std/src/sync/condvar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mod tests;
33

44
use crate::fmt;
55
use crate::sync::{mutex, poison, LockResult, MutexGuard, PoisonError};
6-
use crate::sys::locks as sys;
6+
use crate::sys::sync as sys;
77
use crate::time::{Duration, Instant};
88

99
/// A type indicating whether a timed wait on a condition variable returned

library/std/src/sync/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::mem::ManuallyDrop;
88
use crate::ops::{Deref, DerefMut};
99
use crate::ptr::NonNull;
1010
use crate::sync::{poison, LockResult, TryLockError, TryLockResult};
11-
use crate::sys::locks as sys;
11+
use crate::sys::sync as sys;
1212

1313
/// A mutual exclusion primitive useful for protecting shared data
1414
///

library/std/src/sync/once.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod tests;
88

99
use crate::fmt;
1010
use crate::panic::{RefUnwindSafe, UnwindSafe};
11-
use crate::sys_common::once as sys;
11+
use crate::sys::sync as sys;
1212

1313
/// A synchronization primitive which can be used to run a one-time global
1414
/// initialization. Useful for one-time initialization for FFI or related

library/std/src/sync/reentrant_lock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::fmt;
66
use crate::ops::Deref;
77
use crate::panic::{RefUnwindSafe, UnwindSafe};
88
use crate::sync::atomic::{AtomicUsize, Ordering::Relaxed};
9-
use crate::sys::locks as sys;
9+
use crate::sys::sync as sys;
1010

1111
/// A re-entrant mutual exclusion lock
1212
///

library/std/src/sync/rwlock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::mem::ManuallyDrop;
88
use crate::ops::{Deref, DerefMut};
99
use crate::ptr::NonNull;
1010
use crate::sync::{poison, LockResult, TryLockError, TryLockResult};
11-
use crate::sys::locks as sys;
11+
use crate::sys::sync as sys;
1212

1313
/// A reader-writer lock
1414
///

library/std/src/sys/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ mod pal;
66
mod personality;
77

88
pub mod cmath;
9-
pub mod locks;
109
pub mod os_str;
1110
pub mod path;
11+
pub mod sync;
1212
#[allow(dead_code)]
1313
#[allow(unused_imports)]
1414
pub mod thread_local;

library/std/src/sys/pal/teeos/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ pub mod fs;
1919
#[path = "../unsupported/io.rs"]
2020
pub mod io;
2121
pub mod net;
22-
#[path = "../unsupported/once.rs"]
23-
pub mod once;
2422
pub mod os;
2523
#[path = "../unsupported/pipe.rs"]
2624
pub mod pipe;

library/std/src/sys/pal/uefi/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ pub mod fs;
2121
pub mod io;
2222
#[path = "../unsupported/net.rs"]
2323
pub mod net;
24-
#[path = "../unsupported/once.rs"]
25-
pub mod once;
2624
pub mod os;
2725
#[path = "../unsupported/pipe.rs"]
2826
pub mod pipe;

library/std/src/sys/pal/unsupported/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pub mod env;
66
pub mod fs;
77
pub mod io;
88
pub mod net;
9-
pub mod once;
109
pub mod os;
1110
pub mod pipe;
1211
pub mod process;

0 commit comments

Comments
 (0)