349
349
//! mutable reference even when you just have [`Pin`]`<&mut Self>` (such as in your own
350
350
//! [`poll`] implementation).
351
351
//!
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
358
357
//! [`Box<T>`]: ../../std/boxed/struct.Box.html
359
358
//! [`Vec<T>`]: ../../std/vec/struct.Vec.html
360
359
//! [`Vec::set_len`]: ../../std/vec/struct.Vec.html#method.set_len
361
- //! [`Pin`]: struct.Pin.html
362
360
//! [`Box`]: ../../std/boxed/struct.Box.html
363
361
//! [Vec::pop]: ../../std/vec/struct.Vec.html#method.pop
364
362
//! [Vec::push]: ../../std/vec/struct.Vec.html#method.push
365
363
//! [`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
369
366
//! [`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
377
371
//! [drop-impl]: #drop-implementation
378
372
//! [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
383
374
384
375
#![ stable( feature = "pin" , since = "1.33.0" ) ]
385
376
@@ -397,8 +388,7 @@ use crate::ops::{CoerceUnsized, Deref, DerefMut, DispatchFromDyn, Receiver};
397
388
///
398
389
/// *See the [`pin` module] documentation for an explanation of pinning.*
399
390
///
400
- /// [`Unpin`]: ../../std/marker/trait.Unpin.html
401
- /// [`pin` module]: ../../std/pin/index.html
391
+ /// [`pin` module]: self
402
392
//
403
393
// Note: the `Clone` derive below causes unsoundness as it's possible to implement
404
394
// `Clone` for mutable references.
@@ -481,8 +471,6 @@ impl<P: Deref<Target: Unpin>> Pin<P> {
481
471
///
482
472
/// Unlike `Pin::new_unchecked`, this method is safe because the pointer
483
473
/// `P` dereferences to an [`Unpin`] type, which cancels the pinning guarantees.
484
- ///
485
- /// [`Unpin`]: ../../std/marker/trait.Unpin.html
486
474
#[ stable( feature = "pin" , since = "1.33.0" ) ]
487
475
#[ inline( always) ]
488
476
pub fn new ( pointer : P ) -> Pin < P > {
@@ -495,8 +483,6 @@ impl<P: Deref<Target: Unpin>> Pin<P> {
495
483
///
496
484
/// This requires that the data inside this `Pin` is [`Unpin`] so that we
497
485
/// can ignore the pinning invariants when unwrapping it.
498
- ///
499
- /// [`Unpin`]: ../../std/marker/trait.Unpin.html
500
486
#[ stable( feature = "pin_into_inner" , since = "1.39.0" ) ]
501
487
#[ inline( always) ]
502
488
pub fn into_inner ( pin : Pin < P > ) -> P {
@@ -568,7 +554,7 @@ impl<P: Deref> Pin<P> {
568
554
/// }
569
555
/// ```
570
556
///
571
- /// [`mem::swap`]: ../../std/ mem/fn. swap.html
557
+ /// [`mem::swap`]: crate:: mem:: swap
572
558
#[ cfg_attr( not( bootstrap) , lang = "new_unchecked" ) ]
573
559
#[ stable( feature = "pin" , since = "1.33.0" ) ]
574
560
#[ inline( always) ]
@@ -603,9 +589,6 @@ impl<P: Deref> Pin<P> {
603
589
///
604
590
/// If the underlying data is [`Unpin`], [`Pin::into_inner`] should be used
605
591
/// instead.
606
- ///
607
- /// [`Unpin`]: ../../std/marker/trait.Unpin.html
608
- /// [`Pin::into_inner`]: #method.into_inner
609
592
#[ stable( feature = "pin_into_inner" , since = "1.39.0" ) ]
610
593
#[ inline( always) ]
611
594
pub unsafe fn into_inner_unchecked ( pin : Pin < P > ) -> P {
0 commit comments