Skip to content

Commit 7c1e405

Browse files
committed
ONCE_INIT is deprecated-in-future only for bootstrap
1 parent 13ed0cf commit 7c1e405

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/libstd/io/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub fn copy<R: ?Sized, W: ?Sized>(reader: &mut R, writer: &mut W) -> io::Result<
4848
// `MaybeUninit`. Revisit this once we decided whether that is valid or not.
4949
// This is still technically undefined behavior due to creating a reference
5050
// to uninitialized data, but within libstd we can rely on more guarantees
51-
// than if this code were in an external lib
51+
// than if this code were in an external lib.
5252
unsafe { reader.initializer().initialize(buf.get_mut()); }
5353

5454
let mut written = 0;

src/libstd/sync/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ pub use self::condvar::{Condvar, WaitTimeoutResult};
163163
#[stable(feature = "rust1", since = "1.0.0")]
164164
pub use self::mutex::{Mutex, MutexGuard};
165165
#[stable(feature = "rust1", since = "1.0.0")]
166-
#[allow(deprecated_in_future)]
166+
#[cfg_attr(bootstrap, allow(deprecated_in_future))]
167+
#[allow(deprecated)]
167168
pub use self::once::{Once, OnceState, ONCE_INIT};
168169
#[stable(feature = "rust1", since = "1.0.0")]
169170
pub use crate::sys_common::poison::{PoisonError, TryLockError, TryLockResult, LockResult};

0 commit comments

Comments
 (0)