From: varkor Date: Wed, 24 Jan 2018 09:46:54 +0000 (+0000) Subject: Allow unused_unsafe in LazyCell in preparation for lib change X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~3^2~26^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5d22cce6118ee7c42d83dce4ebee9ce6c4e19580;p=cargo.git Allow unused_unsafe in LazyCell in preparation for lib change https://github.com/rust-lang/rust/pull/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. --- diff --git a/src/cargo/util/lazy_cell.rs b/src/cargo/util/lazy_cell.rs index 607f2ef98..a55254175 100644 --- a/src/cargo/util/lazy_cell.rs +++ b/src/cargo/util/lazy_cell.rs @@ -55,6 +55,7 @@ impl LazyCell { } /// Consumes this `LazyCell`, returning the underlying value. + #[allow(unused_unsafe)] pub fn into_inner(self) -> Option { unsafe { self.inner.into_inner()