@@ -14,8 +14,7 @@ use syntax::ast;
1414
1515use crate :: {
1616 attr:: AttrId , db:: DefDatabase , per_ns:: PerNs , visibility:: Visibility , AdtId , BuiltinType ,
17- ConstId , HasModule , ImplId , LocalModuleId , MacroId , MacroRulesId , ModuleDefId , ModuleId ,
18- TraitId ,
17+ ConstId , HasModule , ImplId , LocalModuleId , MacroId , ModuleDefId , ModuleId , TraitId ,
1918} ;
2019
2120#[ derive( Copy , Clone ) ]
@@ -62,7 +61,7 @@ pub struct ItemScope {
6261 /// Module scoped macros will be inserted into `items` instead of here.
6362 // FIXME: Macro shadowing in one module is not properly handled. Non-item place macros will
6463 // be all resolved to the last one defined if shadowing happens.
65- legacy_macros : FxHashMap < Name , MacroRulesId > ,
64+ legacy_macros : FxHashMap < Name , MacroId > ,
6665 /// The derive macro invocations in this scope.
6766 attr_macros : FxHashMap < AstId < ast:: Item > , MacroCallId > ,
6867 /// The derive macro invocations in this scope, keyed by the owner item over the actual derive attributes
@@ -135,7 +134,7 @@ impl ItemScope {
135134 }
136135
137136 /// Iterate over all legacy textual scoped macros visible at the end of the module
138- pub fn legacy_macros < ' a > ( & ' a self ) -> impl Iterator < Item = ( & ' a Name , MacroRulesId ) > + ' a {
137+ pub fn legacy_macros < ' a > ( & ' a self ) -> impl Iterator < Item = ( & ' a Name , MacroId ) > + ' a {
139138 self . legacy_macros . iter ( ) . map ( |( name, def) | ( name, * def) )
140139 }
141140
@@ -181,7 +180,7 @@ impl ItemScope {
181180 self . declarations . push ( def)
182181 }
183182
184- pub ( crate ) fn get_legacy_macro ( & self , name : & Name ) -> Option < MacroRulesId > {
183+ pub ( crate ) fn get_legacy_macro ( & self , name : & Name ) -> Option < MacroId > {
185184 self . legacy_macros . get ( name) . copied ( )
186185 }
187186
@@ -193,7 +192,7 @@ impl ItemScope {
193192 self . unnamed_consts . push ( konst) ;
194193 }
195194
196- pub ( crate ) fn define_legacy_macro ( & mut self , name : Name , mac : MacroRulesId ) {
195+ pub ( crate ) fn define_legacy_macro ( & mut self , name : Name , mac : MacroId ) {
197196 self . legacy_macros . insert ( name, mac) ;
198197 }
199198
@@ -323,7 +322,7 @@ impl ItemScope {
323322 )
324323 }
325324
326- pub ( crate ) fn collect_legacy_macros ( & self ) -> FxHashMap < Name , MacroRulesId > {
325+ pub ( crate ) fn collect_legacy_macros ( & self ) -> FxHashMap < Name , MacroId > {
327326 self . legacy_macros . clone ( )
328327 }
329328
0 commit comments