Skip to content

Commit

Permalink
ONCE_INIT is deprecated-in-future only for bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jul 19, 2019
1 parent 13ed0cf commit 7c1e405
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libstd/io/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 7c1e405

Please sign in to comment.