From 5d22cce6118ee7c42d83dce4ebee9ce6c4e19580 Mon Sep 17 00:00:00 2001 From: varkor Date: Wed, 24 Jan 2018 09:46:54 +0000 Subject: [PATCH] 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. --- src/cargo/util/lazy_cell.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cargo/util/lazy_cell.rs b/src/cargo/util/lazy_cell.rs index 607f2ef982e..a5525417527 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()