Skip to content

Commit ad8c5e1

Browse files
authored
Rollup merge of #75214 - chansuke:fix-intra-doc-links, r=jyn514
Use intra-doc links in `mem::manually_drop` & `mem::maybe_uninit` This is partial fixes for #75080.
2 parents 83e75ac + 61866bc commit ad8c5e1

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

Diff for: library/core/src/mem/manually_drop.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ use crate::ptr;
5656
/// working with [pinned] data, where reusing the memory without calling the destructor could lead
5757
/// to Undefined Behaviour.
5858
///
59-
/// [`mem::zeroed`]: fn.zeroed.html
60-
/// [`MaybeUninit<T>`]: union.MaybeUninit.html
61-
/// [pinned]: ../pin/index.html
59+
/// [`mem::zeroed`]: crate::mem::zeroed
60+
/// [`MaybeUninit<T>`]: crate::mem::MaybeUninit
61+
/// [pinned]: crate::pin
6262
#[stable(feature = "manually_drop", since = "1.20.0")]
6363
#[lang = "manually_drop"]
6464
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
@@ -116,8 +116,6 @@ impl<T> ManuallyDrop<T> {
116116
/// leaving the state of this container unchanged.
117117
/// It is your responsibility to ensure that this `ManuallyDrop` is not used again.
118118
///
119-
/// [`ManuallyDrop::drop`]: #method.drop
120-
/// [`ManuallyDrop::into_inner`]: #method.into_inner
121119
#[must_use = "if you don't need the value, you can use `ManuallyDrop::drop` instead"]
122120
#[stable(feature = "manually_drop_take", since = "1.42.0")]
123121
#[inline]
@@ -148,9 +146,7 @@ impl<T: ?Sized> ManuallyDrop<T> {
148146
/// This is normally prevented by the type system, but users of `ManuallyDrop` must
149147
/// uphold those guarantees without assistance from the compiler.
150148
///
151-
/// [`ManuallyDrop::into_inner`]: #method.into_inner
152-
/// [`ptr::drop_in_place`]: ../ptr/fn.drop_in_place.html
153-
/// [pinned]: ../pin/index.html
149+
/// [pinned]: crate::pin
154150
#[stable(feature = "manually_drop", since = "1.20.0")]
155151
#[inline]
156152
pub unsafe fn drop(slot: &mut ManuallyDrop<T>) {

Diff for: library/core/src/mem/maybe_uninit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ impl<T> MaybeUninit<T> {
247247
/// Note that dropping a `MaybeUninit<T>` will never call `T`'s drop code.
248248
/// It is your responsibility to make sure `T` gets dropped if it got initialized.
249249
///
250-
/// [`assume_init`]: #method.assume_init
250+
/// [`assume_init`]: MaybeUninit::assume_init
251251
#[stable(feature = "maybe_uninit", since = "1.36.0")]
252252
#[rustc_const_stable(feature = "const_maybe_uninit", since = "1.36.0")]
253253
#[inline(always)]
@@ -525,7 +525,7 @@ impl<T> MaybeUninit<T> {
525525
/// to ensure that that data may indeed be duplicated.
526526
///
527527
/// [inv]: #initialization-invariant
528-
/// [`assume_init`]: #method.assume_init
528+
/// [`assume_init`]: MaybeUninit::assume_init
529529
///
530530
/// # Examples
531531
///

0 commit comments

Comments
 (0)