From ecd41976fc5a13e8c9a706496d714f655a5ab995 Mon Sep 17 00:00:00 2001 From: Fabian Zaiser Date: Wed, 11 Apr 2018 14:27:00 +0200 Subject: [PATCH] Rebase and update code. --- src/librustc_traits/lowering.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/librustc_traits/lowering.rs b/src/librustc_traits/lowering.rs index cbb02e98c3cd1..1b73cd480990c 100644 --- a/src/librustc_traits/lowering.rs +++ b/src/librustc_traits/lowering.rs @@ -108,6 +108,7 @@ impl<'tcx> IntoFromEnvGoal for DomainGoal<'tcx> { FromEnv(..) | WellFormedTy(..) | FromEnvTy(..) | + Normalize(..) | RegionOutlives(..) | TypeOutlives(..) => self, } @@ -288,8 +289,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>) {