]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/mem/manually_drop.rs
Rollup merge of #75485 - RalfJung:pin, r=nagisa
[rust.git] / library / core / src / mem / manually_drop.rs
index 920f5e9c0bd28521e732e3e5159862168fd1c807..e45aa86c0795a915d7f5b079e4189d8a7999e3a7 100644 (file)
@@ -56,9 +56,9 @@
 /// working with [pinned] data, where reusing the memory without calling the destructor could lead
 /// to Undefined Behaviour.
 ///
-/// [`mem::zeroed`]: fn.zeroed.html
-/// [`MaybeUninit<T>`]: union.MaybeUninit.html
-/// [pinned]: ../pin/index.html
+/// [`mem::zeroed`]: crate::mem::zeroed
+/// [`MaybeUninit<T>`]: crate::mem::MaybeUninit
+/// [pinned]: crate::pin
 #[stable(feature = "manually_drop", since = "1.20.0")]
 #[lang = "manually_drop"]
 #[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
@@ -116,8 +116,6 @@ pub const fn into_inner(slot: ManuallyDrop<T>) -> T {
     /// leaving the state of this container unchanged.
     /// It is your responsibility to ensure that this `ManuallyDrop` is not used again.
     ///
-    /// [`ManuallyDrop::drop`]: #method.drop
-    /// [`ManuallyDrop::into_inner`]: #method.into_inner
     #[must_use = "if you don't need the value, you can use `ManuallyDrop::drop` instead"]
     #[stable(feature = "manually_drop_take", since = "1.42.0")]
     #[inline]
@@ -148,9 +146,7 @@ impl<T: ?Sized> ManuallyDrop<T> {
     /// This is normally prevented by the type system, but users of `ManuallyDrop` must
     /// uphold those guarantees without assistance from the compiler.
     ///
-    /// [`ManuallyDrop::into_inner`]: #method.into_inner
-    /// [`ptr::drop_in_place`]: ../ptr/fn.drop_in_place.html
-    /// [pinned]: ../pin/index.html
+    /// [pinned]: crate::pin
     #[stable(feature = "manually_drop", since = "1.20.0")]
     #[inline]
     pub unsafe fn drop(slot: &mut ManuallyDrop<T>) {