Skip to content

Commit b88434e

Browse files
committed
Auto merge of #75816 - LeSeulArtichaut:core-intra-docs, r=jyn514
Use intra-doc-links in `core::{raw, ffi, pin}` Helps with #75080. r? @jyn514
2 parents 2342cc3 + c8a372e commit b88434e

File tree

3 files changed

+15
-34
lines changed

3 files changed

+15
-34
lines changed

library/core/src/ffi.rs

-2
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,6 @@ impl<'a, 'f: 'a> DerefMut for VaList<'a, 'f> {
281281
// improving this.
282282
mod sealed_trait {
283283
/// Trait which permits the allowed types to be used with [VaList::arg].
284-
///
285-
/// [VaList::arg]: ../struct.VaList.html#method.arg
286284
#[unstable(
287285
feature = "c_variadic",
288286
reason = "the `c_variadic` feature has not been properly tested on \

library/core/src/pin.rs

+14-31
Original file line numberDiff line numberDiff line change
@@ -349,37 +349,28 @@
349349
//! mutable reference even when you just have [`Pin`]`<&mut Self>` (such as in your own
350350
//! [`poll`] implementation).
351351
//!
352-
//! [`Pin<P>`]: struct.Pin.html
353-
//! [`Unpin`]: ../marker/trait.Unpin.html
354-
//! [`Deref`]: ../ops/trait.Deref.html
355-
//! [`DerefMut`]: ../ops/trait.DerefMut.html
356-
//! [`mem::swap`]: ../mem/fn.swap.html
357-
//! [`mem::forget`]: ../mem/fn.forget.html
352+
//! [`Pin<P>`]: Pin
353+
//! [`Deref`]: crate::ops::Deref
354+
//! [`DerefMut`]: crate::ops::DerefMut
355+
//! [`mem::swap`]: crate::mem::swap
356+
//! [`mem::forget`]: crate::mem::forget
358357
//! [`Box<T>`]: ../../std/boxed/struct.Box.html
359358
//! [`Vec<T>`]: ../../std/vec/struct.Vec.html
360359
//! [`Vec::set_len`]: ../../std/vec/struct.Vec.html#method.set_len
361-
//! [`Pin`]: struct.Pin.html
362360
//! [`Box`]: ../../std/boxed/struct.Box.html
363361
//! [Vec::pop]: ../../std/vec/struct.Vec.html#method.pop
364362
//! [Vec::push]: ../../std/vec/struct.Vec.html#method.push
365363
//! [`Rc`]: ../../std/rc/struct.Rc.html
366-
//! [`RefCell<T>`]: ../../std/cell/struct.RefCell.html
367-
//! [`Drop`]: ../../std/ops/trait.Drop.html
368-
//! [`drop`]: ../../std/ops/trait.Drop.html#tymethod.drop
364+
//! [`RefCell<T>`]: crate::cell::RefCell
365+
//! [`drop`]: Drop::drop
369366
//! [`VecDeque<T>`]: ../../std/collections/struct.VecDeque.html
370-
//! [`Option<T>`]: ../../std/option/enum.Option.html
371-
//! [`VecDeque<T>`]: ../../std/collections/struct.VecDeque.html
372-
//! [`RefCell<T>`]: ../cell/struct.RefCell.html
373-
//! [`None`]: ../option/enum.Option.html#variant.None
374-
//! [`Some(v)`]: ../option/enum.Option.html#variant.Some
375-
//! [`ptr::write`]: ../ptr/fn.write.html
376-
//! [`Future`]: ../future/trait.Future.html
367+
//! [`Option<T>`]: Option
368+
//! [`Some(v)`]: Some
369+
//! [`ptr::write`]: crate::ptr::write
370+
//! [`Future`]: crate::future::Future
377371
//! [drop-impl]: #drop-implementation
378372
//! [drop-guarantee]: #drop-guarantee
379-
//! [`poll`]: ../../std/future/trait.Future.html#tymethod.poll
380-
//! [`Pin::get_unchecked_mut`]: struct.Pin.html#method.get_unchecked_mut
381-
//! [`bool`]: ../../std/primitive.bool.html
382-
//! [`i32`]: ../../std/primitive.i32.html
373+
//! [`poll`]: crate::future::Future::poll
383374
384375
#![stable(feature = "pin", since = "1.33.0")]
385376

@@ -397,8 +388,7 @@ use crate::ops::{CoerceUnsized, Deref, DerefMut, DispatchFromDyn, Receiver};
397388
///
398389
/// *See the [`pin` module] documentation for an explanation of pinning.*
399390
///
400-
/// [`Unpin`]: ../../std/marker/trait.Unpin.html
401-
/// [`pin` module]: ../../std/pin/index.html
391+
/// [`pin` module]: self
402392
//
403393
// Note: the `Clone` derive below causes unsoundness as it's possible to implement
404394
// `Clone` for mutable references.
@@ -481,8 +471,6 @@ impl<P: Deref<Target: Unpin>> Pin<P> {
481471
///
482472
/// Unlike `Pin::new_unchecked`, this method is safe because the pointer
483473
/// `P` dereferences to an [`Unpin`] type, which cancels the pinning guarantees.
484-
///
485-
/// [`Unpin`]: ../../std/marker/trait.Unpin.html
486474
#[stable(feature = "pin", since = "1.33.0")]
487475
#[inline(always)]
488476
pub fn new(pointer: P) -> Pin<P> {
@@ -495,8 +483,6 @@ impl<P: Deref<Target: Unpin>> Pin<P> {
495483
///
496484
/// This requires that the data inside this `Pin` is [`Unpin`] so that we
497485
/// can ignore the pinning invariants when unwrapping it.
498-
///
499-
/// [`Unpin`]: ../../std/marker/trait.Unpin.html
500486
#[stable(feature = "pin_into_inner", since = "1.39.0")]
501487
#[inline(always)]
502488
pub fn into_inner(pin: Pin<P>) -> P {
@@ -568,7 +554,7 @@ impl<P: Deref> Pin<P> {
568554
/// }
569555
/// ```
570556
///
571-
/// [`mem::swap`]: ../../std/mem/fn.swap.html
557+
/// [`mem::swap`]: crate::mem::swap
572558
#[cfg_attr(not(bootstrap), lang = "new_unchecked")]
573559
#[stable(feature = "pin", since = "1.33.0")]
574560
#[inline(always)]
@@ -603,9 +589,6 @@ impl<P: Deref> Pin<P> {
603589
///
604590
/// If the underlying data is [`Unpin`], [`Pin::into_inner`] should be used
605591
/// instead.
606-
///
607-
/// [`Unpin`]: ../../std/marker/trait.Unpin.html
608-
/// [`Pin::into_inner`]: #method.into_inner
609592
#[stable(feature = "pin_into_inner", since = "1.39.0")]
610593
#[inline(always)]
611594
pub unsafe fn into_inner_unchecked(pin: Pin<P>) -> P {

library/core/src/raw.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/// [`std::mem::transmute`][transmute]. Similarly, the only way to create a true
2727
/// trait object from a `TraitObject` value is with `transmute`.
2828
///
29-
/// [transmute]: ../intrinsics/fn.transmute.html
29+
/// [transmute]: crate::intrinsics::transmute
3030
///
3131
/// Synthesizing a trait object with mismatched types—one where the
3232
/// vtable does not correspond to the type of the value to which the

0 commit comments

Comments
 (0)