diff --git a/src/librustc_traits/lowering.rs b/src/librustc_traits/lowering.rs index 5c5ca42f468da..1cc5715f12354 100644 --- a/src/librustc_traits/lowering.rs +++ b/src/librustc_traits/lowering.rs @@ -106,6 +106,7 @@ impl<'tcx> IntoFromEnvGoal for DomainGoal<'tcx> { FromEnv(..) | WellFormedTy(..) | FromEnvTy(..) | + Normalize(..) | RegionOutlives(..) | TypeOutlives(..) => self, } @@ -284,8 +285,11 @@ pub fn program_clauses_for_associated_type_value<'a, 'tcx>( // `Normalize(>::AssocType -> T)` let normalize_goal = DomainGoal::Normalize(ty::ProjectionPredicate { projection_ty, ty }); // `Normalize(... -> T) :- WC && WC1` - let clause = Clause::Implies(where_clauses, normalize_goal); - Lrc::new(vec![clause]) + let clause = ProgramClause { + goal: normalize_goal, + hypotheses: where_clauses.into_iter().map(|wc| wc.into()).collect(), + }; + Lrc::new(vec![Clause::ForAll(ty::Binder::dummy(clause))]) } pub fn dump_program_clauses<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {