Give the inliner some hints
This commit is contained in:
parent
824e9e47f7
commit
72f144de24
@ -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)) } }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user