@@ -55,24 +55,24 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
5555/// [`RwLock`][rwlock], or one of the [`Atomic`][atomic] types.
5656///
5757/// `Arc` uses atomic operations for reference counting, so `Arc`s can be
58- /// sent between threads. In other words, `Arc<T>` implements [`Send`][send]
59- /// as long as `T` implements `Send` and [`Sync`][sync]. The disadvantage is
58+ /// sent between threads. In other words, `Arc<T>` implements [`Send`]
59+ /// as long as `T` implements [ `Send`] and [`Sync`][sync]. The disadvantage is
6060/// that atomic operations are more expensive than ordinary memory accesses.
6161/// If you are not sharing reference-counted values between threads, consider
62- /// using [`rc::Rc`][rc] for lower overhead. `Rc` is a safe default, because
63- /// the compiler will catch any attempt to send an `Rc` between threads.
62+ /// using [`rc::Rc`] for lower overhead. [ `Rc`] is a safe default, because
63+ /// the compiler will catch any attempt to send an [ `Rc`] between threads.
6464/// However, a library might choose `Arc` in order to give library consumers
6565/// more flexibility.
6666///
6767/// The [`downgrade`][downgrade] method can be used to create a non-owning
68- /// [`Weak`][weak] pointer. A `Weak` pointer can be [`upgrade`][upgrade]d
69- /// to an `Arc`, but this will return [`None`][option] if the value has
70- /// already been dropped.
68+ /// [`Weak`][weak] pointer. A [ `Weak`][weak] pointer can be [`upgrade`][upgrade]d
69+ /// to an `Arc`, but this will return [`None`] if the value has already been
70+ /// dropped.
7171///
7272/// A cycle between `Arc` pointers will never be deallocated. For this reason,
73- /// `Weak` is used to break cycles. For example, a tree could have strong
74- /// `Arc` pointers from parent nodes to children, and `Weak` pointers from
75- /// children back to their parents.
73+ /// [ `Weak`][weak] is used to break cycles. For example, a tree could have
74+ /// strong `Arc` pointers from parent nodes to children, and [ `Weak`][weak]
75+ /// pointers from children back to their parents.
7676///
7777/// `Arc<T>` automatically dereferences to `T` (via the [`Deref`][deref] trait),
7878/// so you can call `T`'s methods on a value of type `Arc<T>`. To avoid name
@@ -86,22 +86,22 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
8686/// Arc::downgrade(&my_arc);
8787/// ```
8888///
89- /// `Weak<T>` does not auto-dereference to `T`, because the value may have
89+ /// [ `Weak<T>`][weak] does not auto-dereference to `T`, because the value may have
9090/// already been destroyed.
9191///
9292/// [arc]: struct.Arc.html
9393/// [weak]: struct.Weak.html
94- /// [rc ]: ../../std/rc/struct.Rc.html
94+ /// [`Rc` ]: ../../std/rc/struct.Rc.html
9595/// [clone]: ../../std/clone/trait.Clone.html#tymethod.clone
9696/// [mutex]: ../../std/sync/struct.Mutex.html
9797/// [rwlock]: ../../std/sync/struct.RwLock.html
9898/// [atomic]: ../../std/sync/atomic/index.html
99- /// [send ]: ../../std/marker/trait.Send.html
99+ /// [`Send` ]: ../../std/marker/trait.Send.html
100100/// [sync]: ../../std/marker/trait.Sync.html
101101/// [deref]: ../../std/ops/trait.Deref.html
102102/// [downgrade]: struct.Arc.html#method.downgrade
103103/// [upgrade]: struct.Weak.html#method.upgrade
104- /// [option ]: ../../std/option/enum.Option.html
104+ /// [`None` ]: ../../std/option/enum.Option.html#variant.None
105105/// [assoc]: ../../book/method-syntax.html#associated-functions
106106///
107107/// # Examples
@@ -127,7 +127,9 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
127127/// }
128128/// ```
129129///
130- /// Sharing a mutable `AtomicUsize`:
130+ /// Sharing a mutable [`AtomicUsize`]:
131+ ///
132+ /// [`AtomicUsize`]: ../../std/sync/atomic/struct.AtomicUsize.html
131133///
132134/// ```no_run
133135/// use std::sync::Arc;
0 commit comments