From e30e47fa68c84f184e7244a622172ae5c99d8c1b Mon Sep 17 00:00:00 2001 From: Esteban Kuber Date: Thu, 18 Nov 2021 01:35:36 +0000 Subject: [PATCH] review comments --- compiler/rustc_typeck/src/check/compare_method.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/compiler/rustc_typeck/src/check/compare_method.rs b/compiler/rustc_typeck/src/check/compare_method.rs index 8442d42c617..4d4662f73a9 100644 --- a/compiler/rustc_typeck/src/check/compare_method.rs +++ b/compiler/rustc_typeck/src/check/compare_method.rs @@ -228,14 +228,8 @@ fn compare_predicate_entailment<'tcx>( traits::normalize(&mut selcx, param_env, normalize_cause, predicate); inh.register_predicates(obligations); - let cause = ObligationCause::new( - span, - impl_m_hir_id, - ObligationCauseCode::CompareImplMethodObligation { - impl_item_def_id: impl_m.def_id, - trait_item_def_id: trait_m.def_id, - }, - ); + let mut cause = cause.clone(); + cause.make_mut().span = span; inh.register_predicate(traits::Obligation::new(cause, param_env, predicate)); }