diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-11-09 10:49:28 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-11-16 09:25:19 +0000 |
| commit | 4f11f3b2571c895c08757aa91af57fc1091e45ef (patch) | |
| tree | fa952f5375f2f1270bd3e4a794434e4836a383bf /compiler/rustc_hir_analysis/src/check/compare_method.rs | |
| parent | 634df06fae22066e2a9f2d3ce68c0fc7203bfa92 (diff) | |
| download | rust-4f11f3b2571c895c08757aa91af57fc1091e45ef.tar.gz rust-4f11f3b2571c895c08757aa91af57fc1091e45ef.zip | |
Convert predicates into Predicate in the Obligation constructor
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check/compare_method.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/compare_method.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/compare_method.rs b/compiler/rustc_hir_analysis/src/check/compare_method.rs index 7c99896b457..ad3e5e034f3 100644 --- a/compiler/rustc_hir_analysis/src/check/compare_method.rs +++ b/compiler/rustc_hir_analysis/src/check/compare_method.rs @@ -238,7 +238,7 @@ fn compare_predicate_entailment<'tcx>( kind: impl_m.kind, }, ); - ocx.register_obligation(traits::Obligation::new(cause, param_env, predicate)); + ocx.register_obligation(traits::Obligation::new(tcx, cause, param_env, predicate)); } // We now need to check that the signature of the impl method is @@ -605,6 +605,7 @@ impl<'tcx> TypeFolder<'tcx> for ImplTraitInTraitCollector<'_, 'tcx> { ); self.ocx.register_obligation(traits::Obligation::new( + self.tcx(), ObligationCause::new( self.span, self.body_id, @@ -1579,7 +1580,7 @@ fn compare_type_predicate_entailment<'tcx>( }, ); ocx.register_obligations(obligations); - ocx.register_obligation(traits::Obligation::new(cause, param_env, predicate)); + ocx.register_obligation(traits::Obligation::new(tcx, cause, param_env, predicate)); } // Check that all obligations are satisfied by the implementation's @@ -1784,7 +1785,7 @@ pub fn check_type_bounds<'tcx>( .subst_iter_copied(tcx, rebased_substs) .map(|(concrete_ty_bound, span)| { debug!("check_type_bounds: concrete_ty_bound = {:?}", concrete_ty_bound); - traits::Obligation::new(mk_cause(span), param_env, concrete_ty_bound) + traits::Obligation::new(tcx, mk_cause(span), param_env, concrete_ty_bound) }) .collect(); debug!("check_type_bounds: item_bounds={:?}", obligations); |
