@@ -52,10 +52,10 @@ use crate::{
52
52
tt,
53
53
visibility:: { RawVisibility , Visibility } ,
54
54
AdtId , AstId , AstIdWithPath , ConstLoc , CrateRootModuleId , EnumLoc , EnumVariantId ,
55
- ExternBlockLoc , ExternCrateLoc , FunctionId , FunctionLoc , ImplLoc , ImportLoc , Intern ,
56
- ItemContainerId , LocalModuleId , Macro2Id , Macro2Loc , MacroExpander , MacroId , MacroRulesId ,
57
- MacroRulesLoc , ModuleDefId , ModuleId , ProcMacroId , ProcMacroLoc , StaticLoc , StructLoc ,
58
- TraitAliasLoc , TraitLoc , TypeAliasLoc , UnionLoc , UnresolvedMacro ,
55
+ ExternBlockLoc , ExternCrateLoc , FunctionId , FunctionLoc , ImplLoc , Intern , ItemContainerId ,
56
+ LocalModuleId , Macro2Id , Macro2Loc , MacroExpander , MacroId , MacroRulesId , MacroRulesLoc ,
57
+ ModuleDefId , ModuleId , ProcMacroId , ProcMacroLoc , StaticLoc , StructLoc , TraitAliasLoc ,
58
+ TraitLoc , TypeAliasLoc , UnionLoc , UnresolvedMacro , UseLoc ,
59
59
} ;
60
60
61
61
static GLOB_RECURSION_LIMIT : Limit = Limit :: new ( 100 ) ;
@@ -146,7 +146,7 @@ impl PartialResolvedImport {
146
146
147
147
#[ derive( Clone , Debug , Eq , PartialEq ) ]
148
148
enum ImportSource {
149
- Import { id : ItemTreeId < item_tree:: Import > , use_tree : Idx < ast:: UseTree > } ,
149
+ Use { id : ItemTreeId < item_tree:: Use > , use_tree : Idx < ast:: UseTree > } ,
150
150
ExternCrate ( ItemTreeId < item_tree:: ExternCrate > ) ,
151
151
}
152
152
@@ -166,7 +166,7 @@ impl Import {
166
166
db : & dyn DefDatabase ,
167
167
krate : CrateId ,
168
168
tree : & ItemTree ,
169
- id : ItemTreeId < item_tree:: Import > ,
169
+ id : ItemTreeId < item_tree:: Use > ,
170
170
mut cb : impl FnMut ( Self ) ,
171
171
) {
172
172
let it = & tree[ id. value ] ;
@@ -181,7 +181,7 @@ impl Import {
181
181
kind,
182
182
is_prelude,
183
183
is_macro_use : false ,
184
- source : ImportSource :: Import { id, use_tree : idx } ,
184
+ source : ImportSource :: Use { id, use_tree : idx } ,
185
185
} ) ;
186
186
} ) ;
187
187
}
@@ -1474,7 +1474,7 @@ impl DefCollector<'_> {
1474
1474
}
1475
1475
1476
1476
for directive in & self . unresolved_imports {
1477
- if let ImportSource :: Import { id : import, use_tree } = directive. import . source {
1477
+ if let ImportSource :: Use { id : import, use_tree } = directive. import . source {
1478
1478
if matches ! (
1479
1479
( directive. import. path. segments( ) . first( ) , & directive. import. path. kind) ,
1480
1480
( Some ( krate) , PathKind :: Plain | PathKind :: Abs ) if diagnosed_extern_crates. contains( krate)
@@ -1576,12 +1576,10 @@ impl ModCollector<'_, '_> {
1576
1576
1577
1577
match item {
1578
1578
ModItem :: Mod ( m) => self . collect_module ( m, & attrs) ,
1579
- ModItem :: Import ( import_id) => {
1580
- let _import_id = ImportLoc {
1581
- container : module,
1582
- id : ItemTreeId :: new ( self . tree_id , import_id) ,
1583
- }
1584
- . intern ( db) ;
1579
+ ModItem :: Use ( import_id) => {
1580
+ let _import_id =
1581
+ UseLoc { container : module, id : ItemTreeId :: new ( self . tree_id , import_id) }
1582
+ . intern ( db) ;
1585
1583
Import :: from_use (
1586
1584
db,
1587
1585
krate,
0 commit comments