@@ -36,13 +36,17 @@ pub struct InternedVariableKindsInner(Vec<chalk_ir::VariableKind<Interner>>);
36
36
#[ derive( PartialEq , Eq , Hash , Debug ) ]
37
37
pub struct InternedSubstitutionInner ( SmallVec < [ GenericArg ; 2 ] > ) ;
38
38
39
+ #[ derive( PartialEq , Eq , Hash , Debug ) ]
40
+ pub struct InternedTypeInner ( chalk_ir:: TyData < Interner > ) ;
41
+
39
42
impl_internable ! (
40
43
InternedVariableKindsInner ,
41
44
InternedSubstitutionInner ,
45
+ InternedTypeInner ,
42
46
) ;
43
47
44
48
impl chalk_ir:: interner:: Interner for Interner {
45
- type InternedType = Arc < chalk_ir :: TyData < Self > > ;
49
+ type InternedType = Interned < InternedTypeInner > ;
46
50
type InternedLifetime = chalk_ir:: LifetimeData < Self > ;
47
51
type InternedConst = Arc < chalk_ir:: ConstData < Self > > ;
48
52
type InternedConcreteConst = ( ) ;
@@ -209,11 +213,11 @@ impl chalk_ir::interner::Interner for Interner {
209
213
210
214
fn intern_ty ( & self , kind : chalk_ir:: TyKind < Self > ) -> Self :: InternedType {
211
215
let flags = kind. compute_flags ( self ) ;
212
- Arc :: new ( chalk_ir:: TyData { kind, flags } )
216
+ Interned :: new ( InternedTypeInner ( chalk_ir:: TyData { kind, flags } ) )
213
217
}
214
218
215
219
fn ty_data < ' a > ( & self , ty : & ' a Self :: InternedType ) -> & ' a chalk_ir:: TyData < Self > {
216
- ty
220
+ & ty . 0
217
221
}
218
222
219
223
fn intern_lifetime ( & self , lifetime : chalk_ir:: LifetimeData < Self > ) -> Self :: InternedLifetime {
0 commit comments