@@ -11,8 +11,9 @@ use hir_def::{
11
11
} ;
12
12
13
13
use crate :: {
14
- code_model:: GenericParam , Adt , AssocItem , DefWithBody , Field , GenericDef , Label , Local ,
15
- MacroDef , ModuleDef , Variant , VariantDef ,
14
+ code_model:: { BuiltinType , GenericParam } ,
15
+ Adt , AssocItem , DefWithBody , Field , GenericDef , Label , Local , MacroDef , ModuleDef , Variant ,
16
+ VariantDef ,
16
17
} ;
17
18
18
19
macro_rules! from_id {
@@ -111,7 +112,7 @@ impl From<ModuleDefId> for ModuleDef {
111
112
ModuleDefId :: StaticId ( it) => ModuleDef :: Static ( it. into ( ) ) ,
112
113
ModuleDefId :: TraitId ( it) => ModuleDef :: Trait ( it. into ( ) ) ,
113
114
ModuleDefId :: TypeAliasId ( it) => ModuleDef :: TypeAlias ( it. into ( ) ) ,
114
- ModuleDefId :: BuiltinType ( it) => ModuleDef :: BuiltinType ( it) ,
115
+ ModuleDefId :: BuiltinType ( it) => ModuleDef :: BuiltinType ( it. into ( ) ) ,
115
116
}
116
117
}
117
118
}
@@ -127,7 +128,7 @@ impl From<ModuleDef> for ModuleDefId {
127
128
ModuleDef :: Static ( it) => ModuleDefId :: StaticId ( it. into ( ) ) ,
128
129
ModuleDef :: Trait ( it) => ModuleDefId :: TraitId ( it. into ( ) ) ,
129
130
ModuleDef :: TypeAlias ( it) => ModuleDefId :: TypeAliasId ( it. into ( ) ) ,
130
- ModuleDef :: BuiltinType ( it) => ModuleDefId :: BuiltinType ( it) ,
131
+ ModuleDef :: BuiltinType ( it) => ModuleDefId :: BuiltinType ( it. into ( ) ) ,
131
132
}
132
133
}
133
134
}
@@ -274,3 +275,15 @@ impl From<ModuleDef> for ItemInNs {
274
275
}
275
276
}
276
277
}
278
+
279
+ impl From < hir_def:: builtin_type:: BuiltinType > for BuiltinType {
280
+ fn from ( inner : hir_def:: builtin_type:: BuiltinType ) -> Self {
281
+ Self { inner }
282
+ }
283
+ }
284
+
285
+ impl From < BuiltinType > for hir_def:: builtin_type:: BuiltinType {
286
+ fn from ( it : BuiltinType ) -> Self {
287
+ it. inner
288
+ }
289
+ }
0 commit comments