We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 824e9e4 commit 72f144dCopy full SHA for 72f144d
compiler/rustc_middle/src/traits/mod.rs
@@ -133,6 +133,7 @@ impl<'tcx> ObligationCause<'tcx> {
133
ObligationCause::dummy_with_span(DUMMY_SP)
134
}
135
136
+ #[inline(always)]
137
pub fn dummy_with_span(span: Span) -> ObligationCause<'tcx> {
138
ObligationCause { span, body_id: hir::CRATE_HIR_ID, code: Default::default() }
139
@@ -203,6 +204,7 @@ pub struct InternedObligationCauseCode<'tcx> {
203
204
205
206
impl<'tcx> From<ObligationCauseCode<'tcx>> for InternedObligationCauseCode<'tcx> {
207
208
fn from(code: ObligationCauseCode<'tcx>) -> Self {
209
Self { code: if code == MISC_OBLIGATION_CAUSE_CODE { None } else { Some(Lrc::new(code)) } }
210
0 commit comments