diff options
| author | Esteban Kuber <esteban@kuber.com.ar> | 2021-11-18 01:35:36 +0000 |
|---|---|---|
| committer | Esteban Kuber <esteban@kuber.com.ar> | 2021-11-20 19:19:34 +0000 |
| commit | e30e47fa68c84f184e7244a622172ae5c99d8c1b (patch) | |
| tree | 894d344a744aab0a50c6937b663368bccf2c7d81 | |
| parent | 55d50a974aed84bdfad43f251eef9386ce10cd2c (diff) | |
| download | rust-e30e47fa68c84f184e7244a622172ae5c99d8c1b.tar.gz rust-e30e47fa68c84f184e7244a622172ae5c99d8c1b.zip | |
review comments
| -rw-r--r-- | compiler/rustc_typeck/src/check/compare_method.rs | 10 |
1 files 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)); } |
