Skip to content

Commit 475b00a

Browse files
committed
Auto merge of rust-lang#92135 - AngelicosPhosphoros:typeid_inline_74362, r=dtolnay
Add `#[inline]` modifier to `TypeId::of` It was already inlined but it happened only in 4th InlinerPass on my testcase. With `#[inline]` modifier it happens on 2nd pass. Closes rust-lang#74362
2 parents aad4f10 + 756d163 commit 475b00a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/any.rs

+1
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,7 @@ impl TypeId {
616616
/// assert_eq!(is_string(&0), false);
617617
/// assert_eq!(is_string(&"cookie monster".to_string()), true);
618618
/// ```
619+
#[inline]
619620
#[must_use]
620621
#[stable(feature = "rust1", since = "1.0.0")]
621622
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]

0 commit comments

Comments
 (0)