about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Kuber <esteban@kuber.com.ar>2021-11-18 01:35:36 +0000
committerEsteban Kuber <esteban@kuber.com.ar>2021-11-20 19:19:34 +0000
commite30e47fa68c84f184e7244a622172ae5c99d8c1b (patch)
tree894d344a744aab0a50c6937b663368bccf2c7d81
parent55d50a974aed84bdfad43f251eef9386ce10cd2c (diff)
downloadrust-e30e47fa68c84f184e7244a622172ae5c99d8c1b.tar.gz
rust-e30e47fa68c84f184e7244a622172ae5c99d8c1b.zip
review comments
-rw-r--r--compiler/rustc_typeck/src/check/compare_method.rs10
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));
         }