diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-04-25 17:37:12 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-04-25 17:37:12 +0000 |
| commit | bec7ce482458429471c1a4c1b50bcc3728297e5e (patch) | |
| tree | 8a9fd14527451257b7e8d73189276625ad992358 /compiler/rustc_data_structures/src | |
| parent | 2b8d27b402b621d20c7c29c500852c727d4cc8cd (diff) | |
Add `#[inline]` in `impl_tag`
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/tagged_ptr/impl_tag.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/tagged_ptr/impl_tag.rs b/compiler/rustc_data_structures/src/tagged_ptr/impl_tag.rs index 0b0c152cc4d..cb7f7d318dc 100644 --- a/compiler/rustc_data_structures/src/tagged_ptr/impl_tag.rs +++ b/compiler/rustc_data_structures/src/tagged_ptr/impl_tag.rs @@ -100,6 +100,7 @@ macro_rules! impl_tag { )* ]); + #[inline] fn into_usize(self) -> usize { // This forbids use of repeating patterns (`Enum::V`&`Enum::V`, etc) // (or at least it should, see <https://github.com/rust-lang/rust/issues/110613>) @@ -112,6 +113,7 @@ macro_rules! impl_tag { } } + #[inline] unsafe fn from_usize(tag: usize) -> Self { match tag { $( |
