@@ -22,7 +22,7 @@ use rustc::traits::{
22
22
ExClauseLift ,
23
23
Goal ,
24
24
GoalKind ,
25
- ProgramClause ,
25
+ Clause ,
26
26
QuantifierKind ,
27
27
Environment ,
28
28
InEnvironment ,
@@ -100,9 +100,9 @@ impl context::Context for ChalkArenas<'tcx> {
100
100
101
101
type Parameter = Kind < ' tcx > ;
102
102
103
- type ProgramClause = ProgramClause < ' tcx > ;
103
+ type ProgramClause = Clause < ' tcx > ;
104
104
105
- type ProgramClauses = Vec < ProgramClause < ' tcx > > ;
105
+ type ProgramClauses = Vec < Clause < ' tcx > > ;
106
106
107
107
type UnificationResult = InferOk < ' tcx , ( ) > ;
108
108
@@ -272,10 +272,14 @@ impl context::InferenceTable<ChalkArenas<'gcx>, ChalkArenas<'tcx>>
272
272
273
273
fn add_clauses (
274
274
& mut self ,
275
- _env : & Environment < ' tcx > ,
276
- _clauses : Vec < ProgramClause < ' tcx > > ,
275
+ env : & Environment < ' tcx > ,
276
+ clauses : Vec < Clause < ' tcx > > ,
277
277
) -> Environment < ' tcx > {
278
- panic ! ( "FIXME no method to add clauses to Environment yet" )
278
+ Environment {
279
+ clauses : self . infcx . tcx . mk_clauses (
280
+ env. clauses . iter ( ) . cloned ( ) . chain ( clauses. into_iter ( ) )
281
+ )
282
+ }
279
283
}
280
284
}
281
285
@@ -287,7 +291,7 @@ impl context::ResolventOps<ChalkArenas<'gcx>, ChalkArenas<'tcx>>
287
291
_environment : & Environment < ' tcx > ,
288
292
_goal : & DomainGoal < ' tcx > ,
289
293
_subst : & CanonicalVarValues < ' tcx > ,
290
- _clause : & ProgramClause < ' tcx > ,
294
+ _clause : & Clause < ' tcx > ,
291
295
) -> chalk_engine:: fallible:: Fallible < Canonical < ' gcx , ChalkExClause < ' gcx > > > {
292
296
panic ! ( )
293
297
}
@@ -328,7 +332,7 @@ impl context::UnificationOps<ChalkArenas<'gcx>, ChalkArenas<'tcx>>
328
332
& self ,
329
333
_environment : & Environment < ' tcx > ,
330
334
goal : & DomainGoal < ' tcx > ,
331
- ) -> Vec < ProgramClause < ' tcx > > {
335
+ ) -> Vec < Clause < ' tcx > > {
332
336
use rustc:: traits:: WhereClause :: * ;
333
337
334
338
match goal {
0 commit comments