Skip to content

Commit

Permalink
Auto merge of #4972 - varkor:lazy-cell-unused-unsafe, r=alexcrichton
Browse files Browse the repository at this point in the history
Allow unused_unsafe in LazyCell in preparation for lib change

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
bors committed Jan 24, 2018
2 parents 26c5996 + 5d22cce commit b1c3e78
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 b1c3e78

Please sign in to comment.