about summary refs log tree commit diff
path: root/library/std/src/lazy.rs
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2020-08-25 09:40:53 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2020-08-25 09:40:53 -0700
commitf3024073f92b15d38b42241e65067f0ba796896c (patch)
treead98bc0b058fe58dcb758811ee478ae815e2c4e8 /library/std/src/lazy.rs
parentc30341ddec0b99bb3bd8bb5fd8c8451778c78330 (diff)
downloadrust-f3024073f92b15d38b42241e65067f0ba796896c.tar.gz
rust-f3024073f92b15d38b42241e65067f0ba796896c.zip
Suggest `mem::forget` if `mem::ManuallyDrop::new` isn't used
I think this communicates the intent better, and is shorter anyway.
Diffstat (limited to 'library/std/src/lazy.rs')
-rw-r--r--library/std/src/lazy.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/lazy.rs b/library/std/src/lazy.rs
index f0548582d2f..d0f27df5185 100644
--- a/library/std/src/lazy.rs
+++ b/library/std/src/lazy.rs
@@ -293,7 +293,7 @@ impl<T> SyncOnceCell<T> {
 
         // Don't drop this `SyncOnceCell`. We just moved out one of the fields, but didn't set
         // the state to uninitialized.
-        mem::ManuallyDrop::new(self);
+        mem::forget(self);
         inner
     }