@@ -1393,7 +1393,7 @@ pub struct Resolver<'a> {
13931393
13941394 crate_loader : & ' a mut dyn CrateLoader ,
13951395 macro_names : FxHashSet < Ident > ,
1396- global_macros : FxHashMap < Name , & ' a NameBinding < ' a > > ,
1396+ macro_prelude : FxHashMap < Name , & ' a NameBinding < ' a > > ,
13971397 pub all_macros : FxHashMap < Name , Def > ,
13981398 lexical_macro_resolutions : Vec < ( Ident , & ' a Cell < LegacyScope < ' a > > ) > ,
13991399 macro_map : FxHashMap < DefId , Lrc < SyntaxExtension > > ,
@@ -1715,7 +1715,7 @@ impl<'a> Resolver<'a> {
17151715
17161716 crate_loader,
17171717 macro_names : FxHashSet ( ) ,
1718- global_macros : FxHashMap ( ) ,
1718+ macro_prelude : FxHashMap ( ) ,
17191719 all_macros : FxHashMap ( ) ,
17201720 lexical_macro_resolutions : Vec :: new ( ) ,
17211721 macro_map : FxHashMap ( ) ,
@@ -2002,7 +2002,6 @@ impl<'a> Resolver<'a> {
20022002 module : Module < ' a > ,
20032003 mut ident : Ident ,
20042004 ns : Namespace ,
2005- ignore_unresolved_invocations : bool ,
20062005 record_used : bool ,
20072006 span : Span )
20082007 -> Result < & ' a NameBinding < ' a > , Determinacy > {
@@ -2012,7 +2011,7 @@ impl<'a> Resolver<'a> {
20122011 self . current_module = self . macro_def_scope ( def) ;
20132012 }
20142013 let result = self . resolve_ident_in_module_unadjusted (
2015- module, ident, ns, ignore_unresolved_invocations , record_used, span,
2014+ module, ident, ns, false , record_used, span,
20162015 ) ;
20172016 self . current_module = orig_current_module;
20182017 result
@@ -2518,7 +2517,7 @@ impl<'a> Resolver<'a> {
25182517 // If there is a TraitRef in scope for an impl, then the method must be in the
25192518 // trait.
25202519 if let Some ( ( module, _) ) = self . current_trait_ref {
2521- if self . resolve_ident_in_module ( module, ident, ns, false , false , span) . is_err ( ) {
2520+ if self . resolve_ident_in_module ( module, ident, ns, false , span) . is_err ( ) {
25222521 let path = & self . current_trait_ref . as_ref ( ) . unwrap ( ) . 1 . path ;
25232522 resolve_error ( self , span, err ( ident. name , & path_names_to_string ( path) ) ) ;
25242523 }
@@ -3225,7 +3224,7 @@ impl<'a> Resolver<'a> {
32253224 } ;
32263225 }
32273226 }
3228- let is_global = self . global_macros . get ( & path[ 0 ] . name ) . cloned ( )
3227+ let is_global = self . macro_prelude . get ( & path[ 0 ] . name ) . cloned ( )
32293228 . map ( |binding| binding. get_macro ( self ) . kind ( ) == MacroKind :: Bang ) . unwrap_or ( false ) ;
32303229 if primary_ns != MacroNS && ( is_global ||
32313230 self . macro_names . contains ( & path[ 0 ] . modern ( ) ) ) {
@@ -3468,7 +3467,7 @@ impl<'a> Resolver<'a> {
34683467 }
34693468
34703469 let binding = if let Some ( module) = module {
3471- self . resolve_ident_in_module ( module, ident, ns, false , record_used, path_span)
3470+ self . resolve_ident_in_module ( module, ident, ns, record_used, path_span)
34723471 } else if opt_ns == Some ( MacroNS ) {
34733472 self . resolve_lexical_macro_path_segment ( ident, ns, record_used, path_span)
34743473 . map ( MacroBinding :: binding)
@@ -3762,7 +3761,7 @@ impl<'a> Resolver<'a> {
37623761 // Look for associated items in the current trait.
37633762 if let Some ( ( module, _) ) = self . current_trait_ref {
37643763 if let Ok ( binding) =
3765- self . resolve_ident_in_module ( module, ident, ns, false , false , module. span ) {
3764+ self . resolve_ident_in_module ( module, ident, ns, false , module. span ) {
37663765 let def = binding. def ( ) ;
37673766 if filter_fn ( def) {
37683767 return Some ( if self . has_self . contains ( & def. def_id ( ) ) {
@@ -4075,7 +4074,7 @@ impl<'a> Resolver<'a> {
40754074 let mut found_traits = Vec :: new ( ) ;
40764075 // Look for the current trait.
40774076 if let Some ( ( module, _) ) = self . current_trait_ref {
4078- if self . resolve_ident_in_module ( module, ident, ns, false , false , module. span ) . is_ok ( ) {
4077+ if self . resolve_ident_in_module ( module, ident, ns, false , module. span ) . is_ok ( ) {
40794078 let def_id = module. def_id ( ) . unwrap ( ) ;
40804079 found_traits. push ( TraitCandidate { def_id : def_id, import_id : None } ) ;
40814080 }
0 commit comments