@@ -72,13 +72,13 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
72
72
/// first: after all, isn't the point of `Arc<T>` thread safety? The key is
73
73
/// this: `Arc<T>` makes it thread safe to have multiple ownership of the same
74
74
/// data, but it doesn't add thread safety to its data. Consider
75
- /// `Arc<RefCell<T>>`. `RefCell<T>` isn't [`Sync`], and if `Arc<T>` was always
76
- /// [`Send`], `Arc<RefCell<T>>` would be as well. But then we'd have a problem:
77
- /// `RefCell<T>` is not thread safe; it keeps track of the borrowing count using
75
+ /// `Arc<`[` RefCell<T>`]` >`. [ `RefCell<T>`] isn't [`Sync`], and if `Arc<T>` was always
76
+ /// [`Send`], `Arc<`[` RefCell<T>`]` >` would be as well. But then we'd have a problem:
77
+ /// [ `RefCell<T>`] is not thread safe; it keeps track of the borrowing count using
78
78
/// non-atomic operations.
79
79
///
80
80
/// In the end, this means that you may need to pair `Arc<T>` with some sort of
81
- /// `std::sync` type, usually `Mutex<T>`.
81
+ /// [ `std::sync`] type, usually [ `Mutex<T>`][mutex] .
82
82
///
83
83
/// ## Breaking cycles with `Weak`
84
84
///
@@ -106,7 +106,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
106
106
/// // a and b both point to the same memory location as foo.
107
107
/// ```
108
108
///
109
- /// The `Arc::clone(&from)` syntax is the most idiomatic because it conveys more explicitly
109
+ /// The [ `Arc::clone(&from)`] syntax is the most idiomatic because it conveys more explicitly
110
110
/// the meaning of the code. In the example above, this syntax makes it easier to see that
111
111
/// this code is creating a new reference rather than copying the whole content of foo.
112
112
///
@@ -141,6 +141,9 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
141
141
/// [upgrade]: struct.Weak.html#method.upgrade
142
142
/// [`None`]: ../../std/option/enum.Option.html#variant.None
143
143
/// [assoc]: ../../book/first-edition/method-syntax.html#associated-functions
144
+ /// [`RefCell<T>`]: ../../std/cell/struct.RefCell.html
145
+ /// [`std::sync`]: ../../std/sync/index.html
146
+ /// [`Arc::clone(&from)`]: #method.clone
144
147
///
145
148
/// # Examples
146
149
///
0 commit comments