@@ -10,8 +10,9 @@ use chalk_ir::interner::{HasInterner, Interner};
10
10
use chalk_ir:: zip:: Zip ;
11
11
use chalk_ir:: { debug, debug_heading} ;
12
12
use 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 ,
15
16
} ;
16
17
use rustc_hash:: FxHashSet ;
17
18
use std:: fmt:: Debug ;
@@ -207,10 +208,18 @@ impl<'s, 'db, I: Interner> Fulfill<'s, 'db, I> {
207
208
let in_env = InEnvironment :: new ( environment, subgoal. clone ( ) ) ;
208
209
self . push_obligation ( Obligation :: Refute ( in_env) ) ;
209
210
}
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
+ } ,
214
223
GoalData :: EqGoal ( EqGoal { a, b } ) => {
215
224
self . unify ( & environment, & a, & b) ?;
216
225
}
0 commit comments