@@ -641,11 +641,16 @@ impl<T> AtomicPtr<T> {
641
641
642
642
/// Loads a value from the pointer.
643
643
///
644
- /// `load` takes an `Ordering` argument which describes the memory ordering of this operation.
644
+ /// `load` takes an [`Ordering`] argument which describes the memory ordering
645
+ /// of this operation.
645
646
///
646
647
/// # Panics
647
648
///
648
- /// Panics if `order` is `Release` or `AcqRel`.
649
+ /// Panics if `order` is [`Release`] or [`AcqRel`].
650
+ ///
651
+ /// [`Ordering`]: enum.Ordering.html
652
+ /// [`Release`]: enum.Ordering.html#variant.Release
653
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
649
654
///
650
655
/// # Examples
651
656
///
@@ -665,7 +670,10 @@ impl<T> AtomicPtr<T> {
665
670
666
671
/// Stores a value into the pointer.
667
672
///
668
- /// `store` takes an `Ordering` argument which describes the memory ordering of this operation.
673
+ /// `store` takes an [`Ordering`] argument which describes the memory ordering
674
+ /// of this operation.
675
+ ///
676
+ /// [`Ordering`]: enum.Ordering.html
669
677
///
670
678
/// # Examples
671
679
///
@@ -693,7 +701,10 @@ impl<T> AtomicPtr<T> {
693
701
694
702
/// Stores a value into the pointer, returning the old value.
695
703
///
696
- /// `swap` takes an `Ordering` argument which describes the memory ordering of this operation.
704
+ /// `swap` takes an [`Ordering`] argument which describes the memory ordering
705
+ /// of this operation.
706
+ ///
707
+ /// [`Ordering`]: enum.Ordering.html
697
708
///
698
709
/// # Examples
699
710
///
@@ -718,8 +729,10 @@ impl<T> AtomicPtr<T> {
718
729
/// The return value is always the previous value. If it is equal to `current`, then the value
719
730
/// was updated.
720
731
///
721
- /// `compare_and_swap` also takes an `Ordering` argument which describes the memory ordering of
722
- /// this operation.
732
+ /// `compare_and_swap` also takes an [`Ordering`] argument which describes the memory
733
+ /// ordering of this operation.
734
+ ///
735
+ /// [`Ordering`]: enum.Ordering.html
723
736
///
724
737
/// # Examples
725
738
///
@@ -748,10 +761,15 @@ impl<T> AtomicPtr<T> {
748
761
/// The return value is a result indicating whether the new value was written and containing
749
762
/// the previous value. On success this value is guaranteed to be equal to `current`.
750
763
///
751
- /// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of this
752
- /// operation. The first describes the required ordering if the operation succeeds while the
753
- /// second describes the required ordering when the operation fails. The failure ordering can't
754
- /// be `Release` or `AcqRel` and must be equivalent or weaker than the success ordering.
764
+ /// `compare_exchange` takes two [`Ordering`] arguments to describe the memory
765
+ /// ordering of this operation. The first describes the required ordering if
766
+ /// the operation succeeds while the second describes the required ordering when
767
+ /// the operation fails. The failure ordering can't be [`Release`] or [`AcqRel`]
768
+ /// and must be equivalent or weaker than the success ordering.
769
+ ///
770
+ /// [`Ordering`]: enum.Ordering.html
771
+ /// [`Release`]: enum.Ordering.html#variant.Release
772
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
755
773
///
756
774
/// # Examples
757
775
///
@@ -790,16 +808,21 @@ impl<T> AtomicPtr<T> {
790
808
791
809
/// Stores a value into the pointer if the current value is the same as the `current` value.
792
810
///
793
- /// Unlike `compare_exchange`, this function is allowed to spuriously fail even when the
811
+ /// Unlike [ `compare_exchange`] , this function is allowed to spuriously fail even when the
794
812
/// comparison succeeds, which can result in more efficient code on some platforms. The
795
813
/// return value is a result indicating whether the new value was written and containing the
796
814
/// previous value.
797
815
///
798
- /// `compare_exchange_weak` takes two `Ordering` arguments to describe the memory
816
+ /// `compare_exchange_weak` takes two [ `Ordering`] arguments to describe the memory
799
817
/// ordering of this operation. The first describes the required ordering if the operation
800
818
/// succeeds while the second describes the required ordering when the operation fails. The
801
- /// failure ordering can't be `Release` or `AcqRel` and must be equivalent or weaker than the
802
- /// success ordering.
819
+ /// failure ordering can't be [`Release`] or [`AcqRel`] and must be equivalent or
820
+ /// weaker than the success ordering.
821
+ ///
822
+ /// [`compare_exchange`]: #method.compare_exchange
823
+ /// [`Ordering`]: enum.Ordering.html
824
+ /// [`Release`]: enum.Ordering.html#variant.Release
825
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
803
826
///
804
827
/// # Examples
805
828
///
0 commit comments