diff options
| author | bors <bors@rust-lang.org> | 2021-12-24 20:06:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-24 20:06:15 +0000 |
| commit | 475b00aa4037461b506539a06d15ca6091b461a7 (patch) | |
| tree | 31d20f46179b38f10f49c75308cf5bf546629e57 | |
| parent | aad4f1039fd5d6bf961ed08eebc6eb69b577f1be (diff) | |
| parent | 756d163741229c6ed35649cd2d0a58c6280bc29b (diff) | |
| download | rust-475b00aa4037461b506539a06d15ca6091b461a7.tar.gz rust-475b00aa4037461b506539a06d15ca6091b461a7.zip | |
Auto merge of #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 #74362
| -rw-r--r-- | library/core/src/any.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/any.rs b/library/core/src/any.rs index 72528185707..bc66fdbd0d8 100644 --- a/library/core/src/any.rs +++ b/library/core/src/any.rs @@ -616,6 +616,7 @@ impl TypeId { /// assert_eq!(is_string(&0), false); /// assert_eq!(is_string(&"cookie monster".to_string()), true); /// ``` + #[inline] #[must_use] #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_type_id", issue = "77125")] |
