about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-08-31 11:20:32 +0000
committerbors <bors@rust-lang.org>2021-08-31 11:20:32 +0000
commit76d18cfb8945f824c8777e04981e930d2037954e (patch)
tree9f4dba058543f58edd2637684793081670592a2d /compiler/rustc_data_structures/src
parentfe37929e4cba2c5c21e6805805769630c736bc3d (diff)
parentfeafda8cd3f98e5ebb0a2637918180722dec4799 (diff)
downloadrust-76d18cfb8945f824c8777e04981e930d2037954e.tar.gz
rust-76d18cfb8945f824c8777e04981e930d2037954e.zip
Auto merge of #88527 - m-ou-se:rollup-az6xtc5, r=m-ou-se
Rollup of 14 pull requests

Successful merges:

 - #88394 (Document `std::env::current_exe` possible rename behaviour)
 - #88406 (Tait nest infer test)
 - #88408 (Add inference cycle TAIT test)
 - #88409 (Add auto trait leakage TAIT test)
 - #88413 (Add weird return types TAIT test)
 - #88450 (fix(rustc_parse): correct span in `maybe_whole_expr!`)
 - #88462 (rustdoc: Stop using resolver for macro loading)
 - #88465 (Adding examples to docs of `std::time` module)
 - #88486 (Remove unused arena macro args)
 - #88492 (Use MaybeUninit::write in functor.rs)
 - #88496 (Fix prelude collision lint suggestion for generics with lifetimes)
 - #88497 (Fix prelude collision suggestions for glob imported traits. )
 - #88503 (Warn when [T; N].into_iter() is ambiguous in the new edition. )
 - #88509 (Don't suggest extra <> in dyn suggestion.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/functor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/functor.rs b/compiler/rustc_data_structures/src/functor.rs
index fe7a256d210..5b83ae31247 100644
--- a/compiler/rustc_data_structures/src/functor.rs
+++ b/compiler/rustc_data_structures/src/functor.rs
@@ -26,7 +26,7 @@ impl<T> IdFunctor for Box<T> {
             // inverse of `Box::assume_init()` and should be safe.
             let mut raw: Box<mem::MaybeUninit<T>> = Box::from_raw(raw.cast());
             // SAFETY: Write the mapped value back into the `Box`.
-            ptr::write(raw.as_mut_ptr(), f(value));
+            raw.write(f(value));
             // SAFETY: We just initialized `raw`.
             raw.assume_init()
         }