about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-05-03 16:38:41 +0000
committerbors <bors@rust-lang.org>2020-05-03 16:38:41 +0000
commitea733c3a59be77b752d6d3f722596bfd5b1fcf31 (patch)
tree61894abbcaaaf485a676ff25e81596bb79463299 /src/libstd
parente5f35df2c6944b843b08369c4b2ff3bdb0beb2d2 (diff)
parentce1dba99185a87eafcc99fc2738a1f8473f13b6e (diff)
downloadrust-ea733c3a59be77b752d6d3f722596bfd5b1fcf31.tar.gz
rust-ea733c3a59be77b752d6d3f722596bfd5b1fcf31.zip
Auto merge of #71853 - Dylan-DPC:rollup-4qi6ry9, r=Dylan-DPC
Rollup of 4 pull requests

Successful merges:

 - #71398 (Add `RefCell::take`)
 - #71663 (Fix exceeding bitshifts not emitting for assoc. consts (properly this time, I swear!))
 - #71726 (Suggest deref when coercing `ty::Ref` to `ty::RawPtr` with arbitrary mutability)
 - #71808 (Add long error explanation for E0539)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sync/once.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs
index 1e6b6c430be..a3ee14e85d2 100644
--- a/src/libstd/sync/once.rs
+++ b/src/libstd/sync/once.rs
@@ -497,7 +497,7 @@ impl Drop for WaiterQueue<'_> {
             let mut queue = (state_and_queue & !STATE_MASK) as *const Waiter;
             while !queue.is_null() {
                 let next = (*queue).next;
-                let thread = (*queue).thread.replace(None).unwrap();
+                let thread = (*queue).thread.take().unwrap();
                 (*queue).signaled.store(true, Ordering::Release);
                 // ^- FIXME (maybe): This is another case of issue #55005
                 // `store()` has a potentially dangling ref to `signaled`.