@@ -958,12 +958,16 @@ macro_rules! atomic_int {
958
958
959
959
/// Loads a value from the atomic integer.
960
960
///
961
- /// `load` takes an `Ordering` argument which describes the memory ordering of this
961
+ /// `load` takes an [ `Ordering`] argument which describes the memory ordering of this
962
962
/// operation.
963
963
///
964
964
/// # Panics
965
965
///
966
- /// Panics if `order` is `Release` or `AcqRel`.
966
+ /// Panics if `order` is [`Release`] or [`AcqRel`].
967
+ ///
968
+ /// [`Ordering`]: enum.Ordering.html
969
+ /// [`Release`]: enum.Ordering.html#variant.Release
970
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
967
971
///
968
972
/// # Examples
969
973
///
@@ -982,9 +986,11 @@ macro_rules! atomic_int {
982
986
983
987
/// Stores a value into the atomic integer.
984
988
///
985
- /// `store` takes an `Ordering` argument which describes the memory ordering of this
989
+ /// `store` takes an [ `Ordering`] argument which describes the memory ordering of this
986
990
/// operation.
987
991
///
992
+ /// [`Ordering`]: enum.Ordering.html
993
+ ///
988
994
/// # Examples
989
995
///
990
996
/// ```
@@ -1007,9 +1013,11 @@ macro_rules! atomic_int {
1007
1013
1008
1014
/// Stores a value into the atomic integer, returning the old value.
1009
1015
///
1010
- /// `swap` takes an `Ordering` argument which describes the memory ordering of this
1016
+ /// `swap` takes an [ `Ordering`] argument which describes the memory ordering of this
1011
1017
/// operation.
1012
1018
///
1019
+ /// [`Ordering`]: enum.Ordering.html
1020
+ ///
1013
1021
/// # Examples
1014
1022
///
1015
1023
/// ```
@@ -1031,9 +1039,11 @@ macro_rules! atomic_int {
1031
1039
/// The return value is always the previous value. If it is equal to `current`, then the
1032
1040
/// value was updated.
1033
1041
///
1034
- /// `compare_and_swap` also takes an `Ordering` argument which describes the memory
1042
+ /// `compare_and_swap` also takes an [ `Ordering`] argument which describes the memory
1035
1043
/// ordering of this operation.
1036
1044
///
1045
+ /// [`Ordering`]: enum.Ordering.html
1046
+ ///
1037
1047
/// # Examples
1038
1048
///
1039
1049
/// ```
@@ -1069,11 +1079,15 @@ macro_rules! atomic_int {
1069
1079
/// containing the previous value. On success this value is guaranteed to be equal to
1070
1080
/// `current`.
1071
1081
///
1072
- /// `compare_exchange` takes two `Ordering` arguments to describe the memory ordering of
1073
- /// this operation. The first describes the required ordering if the operation succeeds
1074
- /// while the second describes the required ordering when the operation fails. The
1075
- /// failure ordering can't be `Release` or `AcqRel` and must be equivalent or weaker
1076
- /// than the success ordering.
1082
+ /// `compare_exchange` takes two [`Ordering`] arguments to describe the memory
1083
+ /// ordering of this operation. The first describes the required ordering if
1084
+ /// the operation succeeds while the second describes the required ordering when
1085
+ /// the operation fails. The failure ordering can't be [`Release`] or [`AcqRel`] and
1086
+ /// must be equivalent or weaker than the success ordering.
1087
+ ///
1088
+ /// [`Ordering`]: enum.Ordering.html
1089
+ /// [`Release`]: enum.Ordering.html#variant.Release
1090
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
1077
1091
///
1078
1092
/// # Examples
1079
1093
///
@@ -1107,16 +1121,21 @@ macro_rules! atomic_int {
1107
1121
/// Stores a value into the atomic integer if the current value is the same as the
1108
1122
/// `current` value.
1109
1123
///
1110
- /// Unlike `compare_exchange`, this function is allowed to spuriously fail even when the
1111
- /// comparison succeeds, which can result in more efficient code on some platforms. The
1112
- /// return value is a result indicating whether the new value was written and containing
1113
- /// the previous value.
1124
+ /// Unlike [ `compare_exchange`] , this function is allowed to spuriously fail even
1125
+ /// when the comparison succeeds, which can result in more efficient code on some
1126
+ /// platforms. The return value is a result indicating whether the new value was
1127
+ /// written and containing the previous value.
1114
1128
///
1115
- /// `compare_exchange_weak` takes two `Ordering` arguments to describe the memory
1129
+ /// `compare_exchange_weak` takes two [ `Ordering`] arguments to describe the memory
1116
1130
/// ordering of this operation. The first describes the required ordering if the
1117
1131
/// operation succeeds while the second describes the required ordering when the
1118
- /// operation fails. The failure ordering can't be `Release` or `AcqRel` and must be
1119
- /// equivalent or weaker than the success ordering.
1132
+ /// operation fails. The failure ordering can't be [`Release`] or [`AcqRel`] and
1133
+ /// must be equivalent or weaker than the success ordering.
1134
+ ///
1135
+ /// [`compare_exchange`]: #method.compare_exchange
1136
+ /// [`Ordering`]: enum.Ordering.html
1137
+ /// [`Release`]: enum.Ordering.html#variant.Release
1138
+ /// [`AcqRel`]: enum.Ordering.html#variant.AcqRel
1120
1139
///
1121
1140
/// # Examples
1122
1141
///
0 commit comments