Skip to content

Commit dc19dc2

Browse files
committed
doc fixes
1 parent 838c549 commit dc19dc2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/rustc_data_structures/src/tagged_ptr.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ pub use drop::TaggedPtr;
4040
/// [`into_ptr`] must be valid for writes (and thus calling [`NonNull::as_mut`]
4141
/// on it must be safe).
4242
///
43-
/// The `BITS` constant must be correct. At least `BITS` bits, least-significant,
44-
/// must be zero on all pointers returned from [`into_ptr`].
43+
/// The [`BITS`] constant must be correct. At least [`BITS`] least significant
44+
/// bits, must be zero on all pointers returned from [`into_ptr`].
4545
///
4646
/// For example, if the alignment of [`Self::Target`] is 2, then `BITS` should be 1.
4747
///
48+
/// [`BITS`]: Pointer::BITS
4849
/// [`into_ptr`]: Pointer::into_ptr
4950
/// [valid]: std::ptr#safety
5051
/// [`<Self as Deref>::Target`]: Deref::Target
@@ -122,7 +123,7 @@ pub unsafe trait Tag: Copy {
122123
/// This function guarantees that only the least-significant [`Self::BITS`]
123124
/// bits can be non-zero.
124125
///
125-
/// [`from_usize`]: Pointer::from_usize
126+
/// [`from_usize`]: Tag::from_usize
126127
/// [`Self::BITS`]: Tag::BITS
127128
fn into_usize(self) -> usize;
128129

0 commit comments

Comments
 (0)