From bec7ce482458429471c1a4c1b50bcc3728297e5e Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Tue, 25 Apr 2023 17:37:12 +0000 Subject: [PATCH] Add `#[inline]` in `impl_tag` --- compiler/rustc_data_structures/src/tagged_ptr/impl_tag.rs | 2 ++ 1 file changed, 2 insertions(+) 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 0b0c152cc4db4..cb7f7d318dc41 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 ) @@ -112,6 +113,7 @@ macro_rules! impl_tag { } } + #[inline] unsafe fn from_usize(tag: usize) -> Self { match tag { $(