diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-05-12 11:29:01 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-05-12 11:29:01 +0000 |
| commit | 72f144de242499776d8ca2f6626d63d169781a05 (patch) | |
| tree | 7173a8e63c9195b460d8c53a5b6a3151009bd980 | |
| parent | 824e9e47f7ae70970a7f174976e43935fdfee98d (diff) | |
| download | rust-72f144de242499776d8ca2f6626d63d169781a05.tar.gz rust-72f144de242499776d8ca2f6626d63d169781a05.zip | |
Give the inliner some hints
| -rw-r--r-- | compiler/rustc_middle/src/traits/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index 4b67fc84d2e..8072dd16ae8 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -133,6 +133,7 @@ impl<'tcx> ObligationCause<'tcx> { ObligationCause::dummy_with_span(DUMMY_SP) } + #[inline(always)] pub fn dummy_with_span(span: Span) -> ObligationCause<'tcx> { ObligationCause { span, body_id: hir::CRATE_HIR_ID, code: Default::default() } } @@ -203,6 +204,7 @@ pub struct InternedObligationCauseCode<'tcx> { } impl<'tcx> From<ObligationCauseCode<'tcx>> for InternedObligationCauseCode<'tcx> { + #[inline(always)] fn from(code: ObligationCauseCode<'tcx>) -> Self { Self { code: if code == MISC_OBLIGATION_CAUSE_CODE { None } else { Some(Lrc::new(code)) } } } |
