diff options
| author | bors <bors@rust-lang.org> | 2024-10-17 11:18:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-17 11:18:57 +0000 |
| commit | e09bf4c07af8a424f9022bfe8d42ec714a51f0be (patch) | |
| tree | 0aa83217a4da4a550ed80601e35381bb06db1c33 /compiler/rustc_traits/src/normalize_projection_ty.rs | |
| parent | ecf6fc5336a7fe24607b8c394f34a4fcd20079c8 (diff) | |
| parent | 6e4f8fea36cd04f623c46d99adc3c370b1879883 (diff) | |
| download | rust-e09bf4c07af8a424f9022bfe8d42ec714a51f0be.tar.gz rust-e09bf4c07af8a424f9022bfe8d42ec714a51f0be.zip | |
Auto merge of #18317 - lnicola:sync-from-rust, r=Veykril
minor: sync from downstream
Diffstat (limited to 'compiler/rustc_traits/src/normalize_projection_ty.rs')
| -rw-r--r-- | compiler/rustc_traits/src/normalize_projection_ty.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_traits/src/normalize_projection_ty.rs b/compiler/rustc_traits/src/normalize_projection_ty.rs index 3102da218db..4c2b7e4769a 100644 --- a/compiler/rustc_traits/src/normalize_projection_ty.rs +++ b/compiler/rustc_traits/src/normalize_projection_ty.rs @@ -1,5 +1,6 @@ use rustc_infer::infer::TyCtxtInferExt; use rustc_infer::infer::canonical::{Canonical, QueryResponse}; +use rustc_infer::traits::PredicateObligations; use rustc_middle::query::Providers; use rustc_middle::ty::{ParamEnvAnd, TyCtxt}; use rustc_trait_selection::error_reporting::InferCtxtErrorExt; @@ -30,7 +31,7 @@ fn normalize_canonicalized_projection_ty<'tcx>( debug_assert!(!ocx.infcx.next_trait_solver()); let selcx = &mut SelectionContext::new(ocx.infcx); let cause = ObligationCause::dummy(); - let mut obligations = vec![]; + let mut obligations = PredicateObligations::new(); let answer = traits::normalize_projection_ty(selcx, param_env, goal, cause, 0, &mut obligations); ocx.register_obligations(obligations); @@ -99,7 +100,7 @@ fn normalize_canonicalized_inherent_projection_ty<'tcx>( |ocx, ParamEnvAnd { param_env, value: goal }| { let selcx = &mut SelectionContext::new(ocx.infcx); let cause = ObligationCause::dummy(); - let mut obligations = vec![]; + let mut obligations = PredicateObligations::new(); let answer = traits::normalize_inherent_projection( selcx, param_env, |
