diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-04-12 19:00:27 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-04-12 19:00:27 +0000 |
| commit | dc19dc29c9c384d2285a2a659111d670483562bb (patch) | |
| tree | 7dcdb622b63f229254cdd7adbd3ff7304131b876 /compiler/rustc_data_structures | |
| parent | 838c5491a4296bb92891403c1a6d0e9d84991b51 (diff) | |
| download | rust-dc19dc29c9c384d2285a2a659111d670483562bb.tar.gz rust-dc19dc29c9c384d2285a2a659111d670483562bb.zip | |
doc fixes
Diffstat (limited to 'compiler/rustc_data_structures')
| -rw-r--r-- | compiler/rustc_data_structures/src/tagged_ptr.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_data_structures/src/tagged_ptr.rs b/compiler/rustc_data_structures/src/tagged_ptr.rs index f10c12ceeda..2a74db12654 100644 --- a/compiler/rustc_data_structures/src/tagged_ptr.rs +++ b/compiler/rustc_data_structures/src/tagged_ptr.rs @@ -40,11 +40,12 @@ pub use drop::TaggedPtr; /// [`into_ptr`] must be valid for writes (and thus calling [`NonNull::as_mut`] /// on it must be safe). /// -/// The `BITS` constant must be correct. At least `BITS` bits, least-significant, -/// must be zero on all pointers returned from [`into_ptr`]. +/// The [`BITS`] constant must be correct. At least [`BITS`] least significant +/// bits, must be zero on all pointers returned from [`into_ptr`]. /// /// For example, if the alignment of [`Self::Target`] is 2, then `BITS` should be 1. /// +/// [`BITS`]: Pointer::BITS /// [`into_ptr`]: Pointer::into_ptr /// [valid]: std::ptr#safety /// [`<Self as Deref>::Target`]: Deref::Target @@ -122,7 +123,7 @@ pub unsafe trait Tag: Copy { /// This function guarantees that only the least-significant [`Self::BITS`] /// bits can be non-zero. /// - /// [`from_usize`]: Pointer::from_usize + /// [`from_usize`]: Tag::from_usize /// [`Self::BITS`]: Tag::BITS fn into_usize(self) -> usize; |
