ONCE_INIT is deprecated-in-future only for bootstrap

This commit is contained in:
Ralf Jung 2019-07-17 10:34:34 +02:00
parent 13ed0cf9e8
commit 7c1e405478
2 changed files with 3 additions and 2 deletions

View file

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

View file

@ -163,7 +163,8 @@ pub use self::condvar::{Condvar, WaitTimeoutResult};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::mutex::{Mutex, MutexGuard};
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(deprecated_in_future)]
#[cfg_attr(bootstrap, allow(deprecated_in_future))]
#[allow(deprecated)]
pub use self::once::{Once, OnceState, ONCE_INIT};
#[stable(feature = "rust1", since = "1.0.0")]
pub use crate::sys_common::poison::{PoisonError, TryLockError, TryLockResult, LockResult};