@@ -913,12 +913,16 @@ macro_rules! atomic_int {
913
913
914
914
/// Loads a value from the atomic integer.
915
915
///
916
- /// `load` takes an `Ordering` argument which describes the memory ordering of this
916
+ /// `load` takes an [ `Ordering`] argument which describes the memory ordering of this
917
917
/// operation.
918
918
///
919
919
/// # Panics
920
920
///
921
- /// Panics if `order` is `Release` or `AcqRel`.
921
+ /// Panics if `order` is [`Release`] or [`AcqRel`].
922
+ ///
923
+ /// [`Ordering`]: enum.Ordering.html
924
+ /// [`Release`]: enum.Ordering.html#variant.Release
925
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
922
926
///
923
927
/// # Examples
924
928
///
@@ -937,9 +941,11 @@ macro_rules! atomic_int {
937
941
938
942
/// Stores a value into the atomic integer.
939
943
///
940
- /// `store` takes an `Ordering` argument which describes the memory ordering of this
944
+ /// `store` takes an [ `Ordering`] argument which describes the memory ordering of this
941
945
/// operation.
942
946
///
947
+ /// [`Ordering`]: enum.Ordering.html
948
+ ///
943
949
/// # Examples
944
950
///
945
951
/// ```
@@ -962,9 +968,11 @@ macro_rules! atomic_int {
962
968
963
969
/// Stores a value into the atomic integer, returning the old value.
964
970
///
965
- /// `swap` takes an `Ordering` argument which describes the memory ordering of this
971
+ /// `swap` takes an [ `Ordering`] argument which describes the memory ordering of this
966
972
/// operation.
967
973
///
974
+ /// [`Ordering`]: enum.Ordering.html
975
+ ///
968
976
/// # Examples
969
977
///
970
978
/// ```
@@ -986,9 +994,11 @@ macro_rules! atomic_int {
986
994
/// The return value is always the previous value. If it is equal to `current`, then the
987
995
/// value was updated.
988
996
///
989
- /// `compare_and_swap` also takes an `Ordering` argument which describes the memory
997
+ /// `compare_and_swap` also takes an [ `Ordering`] argument which describes the memory
990
998
/// ordering of this operation.
991
999
///
1000
+ /// [`Ordering`]: enum.Ordering.html
1001
+ ///
992
1002
/// # Examples
993
1003
///
994
1004
/// ```
@@ -1024,11 +1034,15 @@ macro_rules! atomic_int {
1024
1034
/// containing the previous value. On success this value is guaranteed to be equal to
1025
1035
/// `current`.
1026
1036
///
1027
- /// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of
1028
- /// this operation. The first describes the required ordering if the operation succeeds
1029
- /// while the second describes the required ordering when the operation fails. The
1030
- /// failure ordering can't be `Release` or `AcqRel` and must be equivalent or weaker
1031
- /// than the success ordering.
1037
+ /// `compare_exchange` takes two [`Ordering`] arguments to describe the memory
1038
+ /// ordering of this operation. The first describes the required ordering if
1039
+ /// the operation succeeds while the second describes the required ordering when
1040
+ /// the operation fails. The failure ordering can't be [`Release`] or [`AcqRel`] and
1041
+ /// must be equivalent or weaker than the success ordering.
1042
+ ///
1043
+ /// [`Ordering`]: enum.Ordering.html
1044
+ /// [`Release`]: enum.Ordering.html#variant.Release
1045
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
1032
1046
///
1033
1047
/// # Examples
1034
1048
///
@@ -1062,16 +1076,21 @@ macro_rules! atomic_int {
1062
1076
/// Stores a value into the atomic integer if the current value is the same as the
1063
1077
/// `current` value.
1064
1078
///
1065
- /// Unlike `compare_exchange`, this function is allowed to spuriously fail even when the
1066
- /// comparison succeeds, which can result in more efficient code on some platforms. The
1067
- /// return value is a result indicating whether the new value was written and containing
1068
- /// the previous value.
1079
+ /// Unlike [ `compare_exchange`] , this function is allowed to spuriously fail even
1080
+ /// when the comparison succeeds, which can result in more efficient code on some
1081
+ /// platforms. The return value is a result indicating whether the new value was
1082
+ /// written and containing the previous value.
1069
1083
///
1070
- /// `compare_exchange_weak` takes two `Ordering` arguments to describe the memory
1084
+ /// `compare_exchange_weak` takes two [ `Ordering`] arguments to describe the memory
1071
1085
/// ordering of this operation. The first describes the required ordering if the
1072
1086
/// operation succeeds while the second describes the required ordering when the
1073
- /// operation fails. The failure ordering can't be `Release` or `AcqRel` and must be
1074
- /// equivalent or weaker than the success ordering.
1087
+ /// operation fails. The failure ordering can't be [`Release`] or [`AcqRel`] and
1088
+ /// must be equivalent or weaker than the success ordering.
1089
+ ///
1090
+ /// [`compare_exchange`]: #method.compare_exchange
1091
+ /// [`Ordering`]: enum.Ordering.html
1092
+ /// [`Release`]: enum.Ordering.html#variant.Release
1093
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
1075
1094
///
1076
1095
/// # Examples
1077
1096
///
0 commit comments