Skip to content

Commit

Permalink
Allow unused_unsafe in LazyCell in preparation for lib change
Browse files Browse the repository at this point in the history
rust-lang/rust#47204 makes `UnsafeCell::into_inner` safe, which means `LazyCell::into_inner` will no longer need an `unsafe` block. `LazyCell` is a blocker for the change in Rust: this fix should allow the change to take place.
  • Loading branch information
varkor authored Jan 24, 2018
1 parent 26c5996 commit 5d22cce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cargo/util/lazy_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ impl<T> LazyCell<T> {
}

/// Consumes this `LazyCell`, returning the underlying value.
#[allow(unused_unsafe)]
pub fn into_inner(self) -> Option<T> {
unsafe {
self.inner.into_inner()
Expand Down

0 comments on commit 5d22cce

Please sign in to comment.