diff options
| author | bors <bors@rust-lang.org> | 2021-12-12 22:15:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-12 22:15:32 +0000 |
| commit | 22f8bde876f2fa9c5c4e95be1bce29cc271f2b51 (patch) | |
| tree | 780b4d0cada258ab3536c7bacbaf99dbf7980359 /compiler/rustc_data_structures/src | |
| parent | 6bda5b331cfe7e04e1fe348c58a928fc2b650f4f (diff) | |
| parent | ffc9082d97cf88ac4d8f72bca0382b2499a0184d (diff) | |
| download | rust-22f8bde876f2fa9c5c4e95be1bce29cc271f2b51.tar.gz rust-22f8bde876f2fa9c5c4e95be1bce29cc271f2b51.zip | |
Auto merge of #91549 - fee1-dead:const_env, r=spastorino
Eliminate ConstnessAnd again Closes #91489. Closes #89432. Reverts #91491. Reverts #89450. r? `@spastorino`
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/tagged_ptr/copy.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs index d63bcdb3c2b..e1d3e0bd35a 100644 --- a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs +++ b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs @@ -94,9 +94,11 @@ where // SAFETY: pointer_raw returns the original pointer unsafe { std::mem::transmute_copy(&self.pointer_raw()) } } + #[inline] pub fn tag(&self) -> T { unsafe { T::from_usize(self.packed.get() >> Self::TAG_BIT_SHIFT) } } + #[inline] pub fn set_tag(&mut self, tag: T) { let mut packed = self.packed.get(); let new_tag = T::into_usize(tag) << Self::TAG_BIT_SHIFT; |
