@@ -10,8 +10,9 @@ use chalk_ir::interner::{HasInterner, Interner};
1010use chalk_ir:: zip:: Zip ;
1111use chalk_ir:: { debug, debug_heading} ;
1212use chalk_ir:: {
13- Canonical , ConstrainedSubst , Constraint , Environment , EqGoal , Fallible , Goal , GoalData ,
14- InEnvironment , NoSolution , QuantifierKind , Substitution , UCanonical , UniverseMap ,
13+ Canonical , ConstrainedSubst , Constraint , DomainGoal , Environment , EqGoal , Fallible , Goal ,
14+ GoalData , InEnvironment , LifetimeOutlives , NoSolution , QuantifierKind , Substitution ,
15+ UCanonical , UniverseMap , WhereClause ,
1516} ;
1617use rustc_hash:: FxHashSet ;
1718use std:: fmt:: Debug ;
@@ -207,10 +208,18 @@ impl<'s, 'db, I: Interner> Fulfill<'s, 'db, I> {
207208 let in_env = InEnvironment :: new ( environment, subgoal. clone ( ) ) ;
208209 self . push_obligation ( Obligation :: Refute ( in_env) ) ;
209210 }
210- GoalData :: DomainGoal ( _) => {
211- let in_env = InEnvironment :: new ( environment, goal) ;
212- self . push_obligation ( Obligation :: Prove ( in_env) ) ;
213- }
211+ GoalData :: DomainGoal ( domain_goal) => match domain_goal {
212+ DomainGoal :: Holds ( WhereClause :: LifetimeOutlives ( LifetimeOutlives { a, b } ) ) => {
213+ self . constraints . insert ( InEnvironment :: new (
214+ & environment,
215+ Constraint :: Outlives ( a. clone ( ) , b. clone ( ) ) ,
216+ ) ) ;
217+ }
218+ _ => {
219+ let in_env = InEnvironment :: new ( environment, goal) ;
220+ self . push_obligation ( Obligation :: Prove ( in_env) ) ;
221+ }
222+ } ,
214223 GoalData :: EqGoal ( EqGoal { a, b } ) => {
215224 self . unify ( & environment, & a, & b) ?;
216225 }
0 commit comments