@@ -92,26 +92,6 @@ impl<I: Interner> context::ResolventOps<I, SlgContext<I>> for TruncatingInferenc
92
92
debug ! ( "consequence = {:?}" , consequence) ;
93
93
debug ! ( "conditions = {:?}" , conditions) ;
94
94
95
- let constraints = conditions
96
- . iter ( interner)
97
- . filter_map ( |c| match c. data ( interner) {
98
- GoalData :: DomainGoal ( DomainGoal :: Holds ( WhereClause :: LifetimeOutlives ( a, b) ) ) => {
99
- Some ( InEnvironment :: new (
100
- environment,
101
- Constraint :: Outlives ( a. clone ( ) , b. clone ( ) ) ,
102
- ) )
103
- }
104
- GoalData :: Not ( c1) => match c1. data ( interner) {
105
- GoalData :: DomainGoal ( DomainGoal :: Holds ( WhereClause :: LifetimeOutlives (
106
- _a,
107
- _b,
108
- ) ) ) => panic ! ( "Not allowed." ) ,
109
- _ => None ,
110
- } ,
111
- _ => None ,
112
- } )
113
- . collect ( ) ;
114
-
115
95
// Unify the selected literal Li with C'.
116
96
let unification_result = self
117
97
. infer
@@ -121,7 +101,7 @@ impl<I: Interner> context::ResolventOps<I, SlgContext<I>> for TruncatingInferenc
121
101
let mut ex_clause = ExClause {
122
102
subst : subst. clone ( ) ,
123
103
ambiguous : false ,
124
- constraints,
104
+ constraints : vec ! [ ] ,
125
105
subgoals : vec ! [ ] ,
126
106
delayed_subgoals : vec ! [ ] ,
127
107
answer_time : TimeStamp :: default ( ) ,
@@ -131,26 +111,15 @@ impl<I: Interner> context::ResolventOps<I, SlgContext<I>> for TruncatingInferenc
131
111
// Add the subgoals/region-constraints that unification gave us.
132
112
slg:: into_ex_clause ( interner, unification_result, & mut ex_clause) ;
133
113
134
- let conditions_iter = conditions
135
- . iter ( interner)
136
- . filter ( |c| match c. data ( interner) {
137
- GoalData :: DomainGoal ( DomainGoal :: Holds ( WhereClause :: LifetimeOutlives ( ..) ) ) => false ,
138
- GoalData :: Not ( c1) => match c1. data ( interner) {
139
- GoalData :: DomainGoal ( DomainGoal :: Holds ( WhereClause :: LifetimeOutlives ( ..) ) ) => {
140
- false
141
- }
142
- _ => true ,
143
- } ,
144
- _ => true ,
145
- } )
146
- . map ( |c| match c. data ( interner) {
114
+ // Add the `conditions` from the program clause into the result too.
115
+ ex_clause
116
+ . subgoals
117
+ . extend ( conditions. iter ( interner) . map ( |c| match c. data ( interner) {
147
118
GoalData :: Not ( c1) => {
148
119
Literal :: Negative ( InEnvironment :: new ( environment, Goal :: clone ( c1) ) )
149
120
}
150
121
_ => Literal :: Positive ( InEnvironment :: new ( environment, Goal :: clone ( c) ) ) ,
151
- } ) ;
152
- // Add the `conditions` from the program clause into the result too.
153
- ex_clause. subgoals . extend ( conditions_iter) ;
122
+ } ) ) ;
154
123
155
124
Ok ( ex_clause)
156
125
}
0 commit comments