@@ -26,15 +26,15 @@ pub type OpaqueTyId = chalk_ir::OpaqueTyId<Interner>;
26
26
pub type OpaqueTyDatum = chalk_solve:: rust_ir:: OpaqueTyDatum < Interner > ;
27
27
28
28
impl chalk_ir:: interner:: Interner for Interner {
29
- type InternedType = Box < chalk_ir:: TyData < Self > > ; // FIXME use Arc?
29
+ type InternedType = Arc < chalk_ir:: TyData < Self > > ;
30
30
type InternedLifetime = chalk_ir:: LifetimeData < Self > ;
31
31
type InternedConst = Arc < chalk_ir:: ConstData < Self > > ;
32
32
type InternedConcreteConst = ( ) ;
33
33
type InternedGenericArg = chalk_ir:: GenericArgData < Self > ;
34
34
type InternedGoal = Arc < GoalData < Self > > ;
35
35
type InternedGoals = Vec < Goal < Self > > ;
36
36
type InternedSubstitution = Vec < GenericArg < Self > > ;
37
- type InternedProgramClause = chalk_ir:: ProgramClauseData < Self > ;
37
+ type InternedProgramClause = Arc < chalk_ir:: ProgramClauseData < Self > > ;
38
38
type InternedProgramClauses = Arc < [ chalk_ir:: ProgramClause < Self > ] > ;
39
39
type InternedQuantifiedWhereClauses = Vec < chalk_ir:: QuantifiedWhereClause < Self > > ;
40
40
type InternedVariableKinds = Vec < chalk_ir:: VariableKind < Self > > ;
@@ -197,11 +197,11 @@ impl chalk_ir::interner::Interner for Interner {
197
197
tls:: with_current_program ( |prog| Some ( prog?. debug_quantified_where_clauses ( clauses, fmt) ) )
198
198
}
199
199
200
- fn intern_ty ( & self , ty : chalk_ir:: TyData < Self > ) -> Box < chalk_ir:: TyData < Self > > {
201
- Box :: new ( ty)
200
+ fn intern_ty ( & self , ty : chalk_ir:: TyData < Self > ) -> Arc < chalk_ir:: TyData < Self > > {
201
+ Arc :: new ( ty)
202
202
}
203
203
204
- fn ty_data < ' a > ( & self , ty : & ' a Box < chalk_ir:: TyData < Self > > ) -> & ' a chalk_ir:: TyData < Self > {
204
+ fn ty_data < ' a > ( & self , ty : & ' a Arc < chalk_ir:: TyData < Self > > ) -> & ' a chalk_ir:: TyData < Self > {
205
205
ty
206
206
}
207
207
@@ -230,7 +230,7 @@ impl chalk_ir::interner::Interner for Interner {
230
230
constant
231
231
}
232
232
233
- fn const_eq ( & self , _ty : & Box < chalk_ir:: TyData < Self > > , _c1 : & ( ) , _c2 : & ( ) ) -> bool {
233
+ fn const_eq ( & self , _ty : & Arc < chalk_ir:: TyData < Self > > , _c1 : & ( ) , _c2 : & ( ) ) -> bool {
234
234
true
235
235
}
236
236
@@ -284,13 +284,13 @@ impl chalk_ir::interner::Interner for Interner {
284
284
fn intern_program_clause (
285
285
& self ,
286
286
data : chalk_ir:: ProgramClauseData < Self > ,
287
- ) -> chalk_ir:: ProgramClauseData < Self > {
288
- data
287
+ ) -> Arc < chalk_ir:: ProgramClauseData < Self > > {
288
+ Arc :: new ( data)
289
289
}
290
290
291
291
fn program_clause_data < ' a > (
292
292
& self ,
293
- clause : & ' a chalk_ir:: ProgramClauseData < Self > ,
293
+ clause : & ' a Arc < chalk_ir:: ProgramClauseData < Self > > ,
294
294
) -> & ' a chalk_ir:: ProgramClauseData < Self > {
295
295
clause
296
296
}
0 commit comments