Skip to content

Commit 72f144d

Browse files
committed
Give the inliner some hints
1 parent 824e9e4 commit 72f144d

File tree

1 file changed

+2
-0
lines changed
  • compiler/rustc_middle/src/traits

1 file changed

+2
-0
lines changed

compiler/rustc_middle/src/traits/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ impl<'tcx> ObligationCause<'tcx> {
133133
ObligationCause::dummy_with_span(DUMMY_SP)
134134
}
135135

136+
#[inline(always)]
136137
pub fn dummy_with_span(span: Span) -> ObligationCause<'tcx> {
137138
ObligationCause { span, body_id: hir::CRATE_HIR_ID, code: Default::default() }
138139
}
@@ -203,6 +204,7 @@ pub struct InternedObligationCauseCode<'tcx> {
203204
}
204205

205206
impl<'tcx> From<ObligationCauseCode<'tcx>> for InternedObligationCauseCode<'tcx> {
207+
#[inline(always)]
206208
fn from(code: ObligationCauseCode<'tcx>) -> Self {
207209
Self { code: if code == MISC_OBLIGATION_CAUSE_CODE { None } else { Some(Lrc::new(code)) } }
208210
}

0 commit comments

Comments
 (0)