Skip to content

Commit 2c173af

Browse files
committed
review comments
1 parent 1cadfe6 commit 2c173af

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Diff for: compiler/rustc_typeck/src/check/compare_method.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,8 @@ fn compare_predicate_entailment<'tcx>(
228228
traits::normalize(&mut selcx, param_env, normalize_cause, predicate);
229229

230230
inh.register_predicates(obligations);
231-
let cause = ObligationCause::new(
232-
span,
233-
impl_m_hir_id,
234-
ObligationCauseCode::CompareImplMethodObligation {
235-
impl_item_def_id: impl_m.def_id,
236-
trait_item_def_id: trait_m.def_id,
237-
},
238-
);
231+
let mut cause = cause.clone();
232+
cause.make_mut().span = span;
239233
inh.register_predicate(traits::Obligation::new(cause, param_env, predicate));
240234
}
241235

0 commit comments

Comments
 (0)