diff options
| author | Ralf Jung <post@ralfj.de> | 2019-07-17 10:34:34 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-07-19 09:48:06 +0200 |
| commit | 7c1e4054787f99dff36aa66318b7589f78dfc7d9 (patch) | |
| tree | 9337c675fb418501463e94bc567a0c2b693d185b | |
| parent | 13ed0cf9e86a4fdbf75152849353050fea5d4461 (diff) | |
| download | rust-7c1e4054787f99dff36aa66318b7589f78dfc7d9.tar.gz rust-7c1e4054787f99dff36aa66318b7589f78dfc7d9.zip | |
ONCE_INIT is deprecated-in-future only for bootstrap
| -rw-r--r-- | src/libstd/io/util.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sync/mod.rs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs index 20979e02a43..33cc87eb795 100644 --- a/src/libstd/io/util.rs +++ b/src/libstd/io/util.rs @@ -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; diff --git a/src/libstd/sync/mod.rs b/src/libstd/sync/mod.rs index 5d4cdb16472..e29faf18d83 100644 --- a/src/libstd/sync/mod.rs +++ b/src/libstd/sync/mod.rs @@ -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}; |
