Skip to content

Commit 7e50039

Browse files
committed
Rebase and update code.
1 parent 0bf3eb6 commit 7e50039

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/librustc_traits/lowering.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ impl<'tcx> IntoFromEnvGoal for DomainGoal<'tcx> {
106106
FromEnv(..) |
107107
WellFormedTy(..) |
108108
FromEnvTy(..) |
109+
Normalize(..) |
109110
RegionOutlives(..) |
110111
TypeOutlives(..) => self,
111112
}
@@ -284,8 +285,11 @@ pub fn program_clauses_for_associated_type_value<'a, 'tcx>(
284285
// `Normalize(<A0 as Trait<A1..An>>::AssocType<Pn+1..Pm> -> T)`
285286
let normalize_goal = DomainGoal::Normalize(ty::ProjectionPredicate { projection_ty, ty });
286287
// `Normalize(... -> T) :- WC && WC1`
287-
let clause = Clause::Implies(where_clauses, normalize_goal);
288-
Lrc::new(vec![clause])
288+
let clause = ProgramClause {
289+
goal: normalize_goal,
290+
hypotheses: where_clauses.into_iter().map(|wc| wc.into()).collect(),
291+
};
292+
Lrc::new(vec![Clause::ForAll(ty::Binder::dummy(clause))])
289293
}
290294

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

0 commit comments

Comments
 (0)