提交 475b00aa 编写于 作者: B bors

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
......@@ -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")]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册