@@ -619,11 +619,16 @@ impl<T> AtomicPtr<T> {
619
619
620
620
/// Loads a value from the pointer.
621
621
///
622
- /// `load` takes an `Ordering` argument which describes the memory ordering of this operation.
622
+ /// `load` takes an [`Ordering`] argument which describes the memory ordering
623
+ /// of this operation.
623
624
///
624
625
/// # Panics
625
626
///
626
- /// Panics if `order` is `Release` or `AcqRel`.
627
+ /// Panics if `order` is [`Release`] or [`AcqRel`].
628
+ ///
629
+ /// [`Ordering`]: enum.Ordering.html
630
+ /// [`Release`]: enum.Ordering.html#variant.Release
631
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
627
632
///
628
633
/// # Examples
629
634
///
@@ -643,7 +648,10 @@ impl<T> AtomicPtr<T> {
643
648
644
649
/// Stores a value into the pointer.
645
650
///
646
- /// `store` takes an `Ordering` argument which describes the memory ordering of this operation.
651
+ /// `store` takes an [`Ordering`] argument which describes the memory ordering
652
+ /// of this operation.
653
+ ///
654
+ /// [`Ordering`]: enum.Ordering.html
647
655
///
648
656
/// # Examples
649
657
///
@@ -671,7 +679,10 @@ impl<T> AtomicPtr<T> {
671
679
672
680
/// Stores a value into the pointer, returning the old value.
673
681
///
674
- /// `swap` takes an `Ordering` argument which describes the memory ordering of this operation.
682
+ /// `swap` takes an [`Ordering`] argument which describes the memory ordering
683
+ /// of this operation.
684
+ ///
685
+ /// [`Ordering`]: enum.Ordering.html
675
686
///
676
687
/// # Examples
677
688
///
@@ -696,8 +707,10 @@ impl<T> AtomicPtr<T> {
696
707
/// The return value is always the previous value. If it is equal to `current`, then the value
697
708
/// was updated.
698
709
///
699
- /// `compare_and_swap` also takes an `Ordering` argument which describes the memory ordering of
700
- /// this operation.
710
+ /// `compare_and_swap` also takes an [`Ordering`] argument which describes the memory
711
+ /// ordering of this operation.
712
+ ///
713
+ /// [`Ordering`]: enum.Ordering.html
701
714
///
702
715
/// # Examples
703
716
///
@@ -726,10 +739,15 @@ impl<T> AtomicPtr<T> {
726
739
/// The return value is a result indicating whether the new value was written and containing
727
740
/// the previous value. On success this value is guaranteed to be equal to `current`.
728
741
///
729
- /// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of this
730
- /// operation. The first describes the required ordering if the operation succeeds while the
731
- /// second describes the required ordering when the operation fails. The failure ordering can't
732
- /// be `Release` or `AcqRel` and must be equivalent or weaker than the success ordering.
742
+ /// `compare_exchange` takes two [`Ordering`] arguments to describe the memory
743
+ /// ordering of this operation. The first describes the required ordering if
744
+ /// the operation succeeds while the second describes the required ordering when
745
+ /// the operation fails. The failure ordering can't be [`Release`] or [`AcqRel`]
746
+ /// and must be equivalent or weaker than the success ordering.
747
+ ///
748
+ /// [`Ordering`]: enum.Ordering.html
749
+ /// [`Release`]: enum.Ordering.html#variant.Release
750
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
733
751
///
734
752
/// # Examples
735
753
///
@@ -768,16 +786,21 @@ impl<T> AtomicPtr<T> {
768
786
769
787
/// Stores a value into the pointer if the current value is the same as the `current` value.
770
788
///
771
- /// Unlike `compare_exchange`, this function is allowed to spuriously fail even when the
789
+ /// Unlike [ `compare_exchange`] , this function is allowed to spuriously fail even when the
772
790
/// comparison succeeds, which can result in more efficient code on some platforms. The
773
791
/// return value is a result indicating whether the new value was written and containing the
774
792
/// previous value.
775
793
///
776
- /// `compare_exchange_weak` takes two `Ordering` arguments to describe the memory
794
+ /// `compare_exchange_weak` takes two [ `Ordering`] arguments to describe the memory
777
795
/// ordering of this operation. The first describes the required ordering if the operation
778
796
/// succeeds while the second describes the required ordering when the operation fails. The
779
- /// failure ordering can't be `Release` or `AcqRel` and must be equivalent or weaker than the
780
- /// success ordering.
797
+ /// failure ordering can't be [`Release`] or [`AcqRel`] and must be equivalent or
798
+ /// weaker than the success ordering.
799
+ ///
800
+ /// [`compare_exchange`]: #method.compare_exchange
801
+ /// [`Ordering`]: enum.Ordering.html
802
+ /// [`Release`]: enum.Ordering.html#variant.Release
803
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
781
804
///
782
805
/// # Examples
783
806
///
0 commit comments