Skip to content

Commit ecd4197

Browse files
committed
Rebase and update code.
1 parent 27393b1 commit ecd4197

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/librustc_traits/lowering.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ impl<'tcx> IntoFromEnvGoal for DomainGoal<'tcx> {
108108
FromEnv(..) |
109109
WellFormedTy(..) |
110110
FromEnvTy(..) |
111+
Normalize(..) |
111112
RegionOutlives(..) |
112113
TypeOutlives(..) => self,
113114
}
@@ -288,8 +289,11 @@ pub fn program_clauses_for_associated_type_value<'a, 'tcx>(
288289
// `Normalize(<A0 as Trait<A1..An>>::AssocType<Pn+1..Pm> -> T)`
289290
let normalize_goal = DomainGoal::Normalize(ty::ProjectionPredicate { projection_ty, ty });
290291
// `Normalize(... -> T) :- WC && WC1`
291-
let clause = Clause::Implies(where_clauses, normalize_goal);
292-
Lrc::new(vec![clause])
292+
let clause = ProgramClause {
293+
goal: normalize_goal,
294+
hypotheses: where_clauses.into_iter().map(|wc| wc.into()).collect(),
295+
};
296+
Lrc::new(vec![Clause::ForAll(ty::Binder::dummy(clause))])
293297
}
294298

295299
pub fn dump_program_clauses<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {

0 commit comments

Comments
 (0)