diff options
| author | Boxy <rust@boxyuwu.dev> | 2025-05-01 13:26:23 +0100 | 
|---|---|---|
| committer | Boxy <rust@boxyuwu.dev> | 2025-05-01 20:05:02 +0100 | 
| commit | 238d113b0726b9734ec42737cbc461d08520bf35 (patch) | |
| tree | 9de7a1b49d6267428d9e4b83af526ff8f933d567 /compiler/rustc_traits/src | |
| parent | 53e3907bcb5a4519a6558051476c3198aba2a12c (diff) | |
| download | rust-238d113b0726b9734ec42737cbc461d08520bf35.tar.gz rust-238d113b0726b9734ec42737cbc461d08520bf35.zip | |
Set groundwork for proper const normalization
Diffstat (limited to 'compiler/rustc_traits/src')
| -rw-r--r-- | compiler/rustc_traits/src/normalize_projection_ty.rs | 14 | 
1 files changed, 10 insertions, 4 deletions
| diff --git a/compiler/rustc_traits/src/normalize_projection_ty.rs b/compiler/rustc_traits/src/normalize_projection_ty.rs index 14a92ebb9f9..e52898cc6e2 100644 --- a/compiler/rustc_traits/src/normalize_projection_ty.rs +++ b/compiler/rustc_traits/src/normalize_projection_ty.rs @@ -32,8 +32,14 @@ fn normalize_canonicalized_projection_ty<'tcx>( let selcx = &mut SelectionContext::new(ocx.infcx); let cause = ObligationCause::dummy(); let mut obligations = PredicateObligations::new(); - let answer = - traits::normalize_projection_ty(selcx, param_env, goal, cause, 0, &mut obligations); + let answer = traits::normalize_projection_term( + selcx, + param_env, + goal.into(), + cause, + 0, + &mut obligations, + ); ocx.register_obligations(obligations); // #112047: With projections and opaques, we are able to create opaques that // are recursive (given some generic parameters of the opaque's type variables). @@ -104,14 +110,14 @@ fn normalize_canonicalized_inherent_projection_ty<'tcx>( let answer = traits::normalize_inherent_projection( selcx, param_env, - goal, + goal.into(), cause, 0, &mut obligations, ); ocx.register_obligations(obligations); - Ok(NormalizationResult { normalized_ty: answer }) + Ok(NormalizationResult { normalized_ty: answer.expect_type() }) }, ) } | 
