@@ -192,59 +192,58 @@ impl chalk_ir::interner::Interner for Interner {
192
192
tls:: with_current_program ( |prog| Some ( prog?. debug_quantified_where_clauses ( clauses, fmt) ) )
193
193
}
194
194
195
- fn intern_ty ( & self , kind : chalk_ir:: TyKind < Self > ) -> Arc < chalk_ir :: TyData < Self > > {
195
+ fn intern_ty ( & self , kind : chalk_ir:: TyKind < Self > ) -> Self :: InternedType {
196
196
let flags = kind. compute_flags ( self ) ;
197
197
Arc :: new ( chalk_ir:: TyData { kind, flags } )
198
198
}
199
199
200
- fn ty_data < ' a > ( & self , ty : & ' a Arc < chalk_ir :: TyData < Self > > ) -> & ' a chalk_ir:: TyData < Self > {
200
+ fn ty_data < ' a > ( & self , ty : & ' a Self :: InternedType ) -> & ' a chalk_ir:: TyData < Self > {
201
201
ty
202
202
}
203
203
204
- fn intern_lifetime (
205
- & self ,
206
- lifetime : chalk_ir:: LifetimeData < Self > ,
207
- ) -> chalk_ir:: LifetimeData < Self > {
204
+ fn intern_lifetime ( & self , lifetime : chalk_ir:: LifetimeData < Self > ) -> Self :: InternedLifetime {
208
205
lifetime
209
206
}
210
207
211
208
fn lifetime_data < ' a > (
212
209
& self ,
213
- lifetime : & ' a chalk_ir :: LifetimeData < Self > ,
210
+ lifetime : & ' a Self :: InternedLifetime ,
214
211
) -> & ' a chalk_ir:: LifetimeData < Self > {
215
212
lifetime
216
213
}
217
214
218
- fn intern_const ( & self , constant : chalk_ir:: ConstData < Self > ) -> Arc < chalk_ir :: ConstData < Self > > {
215
+ fn intern_const ( & self , constant : chalk_ir:: ConstData < Self > ) -> Self :: InternedConst {
219
216
Arc :: new ( constant)
220
217
}
221
218
222
- fn const_data < ' a > (
223
- & self ,
224
- constant : & ' a Arc < chalk_ir:: ConstData < Self > > ,
225
- ) -> & ' a chalk_ir:: ConstData < Self > {
219
+ fn const_data < ' a > ( & self , constant : & ' a Self :: InternedConst ) -> & ' a chalk_ir:: ConstData < Self > {
226
220
constant
227
221
}
228
222
229
- fn const_eq ( & self , _ty : & Arc < chalk_ir:: TyData < Self > > , _c1 : & ( ) , _c2 : & ( ) ) -> bool {
223
+ fn const_eq (
224
+ & self ,
225
+ _ty : & Self :: InternedType ,
226
+ _c1 : & Self :: InternedConcreteConst ,
227
+ _c2 : & Self :: InternedConcreteConst ,
228
+ ) -> bool {
230
229
true
231
230
}
232
231
233
232
fn intern_generic_arg (
234
233
& self ,
235
234
parameter : chalk_ir:: GenericArgData < Self > ,
236
- ) -> chalk_ir :: GenericArgData < Self > {
235
+ ) -> Self :: InternedGenericArg {
237
236
parameter
238
237
}
239
238
240
239
fn generic_arg_data < ' a > (
241
240
& self ,
242
- parameter : & ' a chalk_ir :: GenericArgData < Self > ,
241
+ parameter : & ' a Self :: InternedGenericArg ,
243
242
) -> & ' a chalk_ir:: GenericArgData < Self > {
244
243
parameter
245
244
}
246
245
247
- fn intern_goal ( & self , goal : GoalData < Self > ) -> Arc < GoalData < Self > > {
246
+ fn intern_goal ( & self , goal : GoalData < Self > ) -> Self :: InternedGoal {
248
247
Arc :: new ( goal)
249
248
}
250
249
@@ -255,11 +254,11 @@ impl chalk_ir::interner::Interner for Interner {
255
254
data. into_iter ( ) . collect ( )
256
255
}
257
256
258
- fn goal_data < ' a > ( & self , goal : & ' a Arc < GoalData < Self > > ) -> & ' a GoalData < Self > {
257
+ fn goal_data < ' a > ( & self , goal : & ' a Self :: InternedGoal ) -> & ' a GoalData < Self > {
259
258
goal
260
259
}
261
260
262
- fn goals_data < ' a > ( & self , goals : & ' a Vec < Goal < Interner > > ) -> & ' a [ Goal < Interner > ] {
261
+ fn goals_data < ' a > ( & self , goals : & ' a Self :: InternedGoals ) -> & ' a [ Goal < Interner > ] {
263
262
goals
264
263
}
265
264
@@ -280,27 +279,27 @@ impl chalk_ir::interner::Interner for Interner {
280
279
fn intern_program_clause (
281
280
& self ,
282
281
data : chalk_ir:: ProgramClauseData < Self > ,
283
- ) -> Arc < chalk_ir :: ProgramClauseData < Self > > {
282
+ ) -> Self :: InternedProgramClause {
284
283
Arc :: new ( data)
285
284
}
286
285
287
286
fn program_clause_data < ' a > (
288
287
& self ,
289
- clause : & ' a Arc < chalk_ir :: ProgramClauseData < Self > > ,
288
+ clause : & ' a Self :: InternedProgramClause ,
290
289
) -> & ' a chalk_ir:: ProgramClauseData < Self > {
291
290
clause
292
291
}
293
292
294
293
fn intern_program_clauses < E > (
295
294
& self ,
296
295
data : impl IntoIterator < Item = Result < chalk_ir:: ProgramClause < Self > , E > > ,
297
- ) -> Result < Arc < [ chalk_ir :: ProgramClause < Self > ] > , E > {
296
+ ) -> Result < Self :: InternedProgramClauses , E > {
298
297
data. into_iter ( ) . collect ( )
299
298
}
300
299
301
300
fn program_clauses_data < ' a > (
302
301
& self ,
303
- clauses : & ' a Arc < [ chalk_ir :: ProgramClause < Self > ] > ,
302
+ clauses : & ' a Self :: InternedProgramClauses ,
304
303
) -> & ' a [ chalk_ir:: ProgramClause < Self > ] {
305
304
& clauses
306
305
}
0 commit comments