@@ -1393,7 +1393,7 @@ pub struct Resolver<'a> {
1393
1393
1394
1394
crate_loader : & ' a mut dyn CrateLoader ,
1395
1395
macro_names : FxHashSet < Ident > ,
1396
- global_macros : FxHashMap < Name , & ' a NameBinding < ' a > > ,
1396
+ macro_prelude : FxHashMap < Name , & ' a NameBinding < ' a > > ,
1397
1397
pub all_macros : FxHashMap < Name , Def > ,
1398
1398
lexical_macro_resolutions : Vec < ( Ident , & ' a Cell < LegacyScope < ' a > > ) > ,
1399
1399
macro_map : FxHashMap < DefId , Lrc < SyntaxExtension > > ,
@@ -1715,7 +1715,7 @@ impl<'a> Resolver<'a> {
1715
1715
1716
1716
crate_loader,
1717
1717
macro_names : FxHashSet ( ) ,
1718
- global_macros : FxHashMap ( ) ,
1718
+ macro_prelude : FxHashMap ( ) ,
1719
1719
all_macros : FxHashMap ( ) ,
1720
1720
lexical_macro_resolutions : Vec :: new ( ) ,
1721
1721
macro_map : FxHashMap ( ) ,
@@ -2002,7 +2002,6 @@ impl<'a> Resolver<'a> {
2002
2002
module : Module < ' a > ,
2003
2003
mut ident : Ident ,
2004
2004
ns : Namespace ,
2005
- ignore_unresolved_invocations : bool ,
2006
2005
record_used : bool ,
2007
2006
span : Span )
2008
2007
-> Result < & ' a NameBinding < ' a > , Determinacy > {
@@ -2012,7 +2011,7 @@ impl<'a> Resolver<'a> {
2012
2011
self . current_module = self . macro_def_scope ( def) ;
2013
2012
}
2014
2013
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,
2016
2015
) ;
2017
2016
self . current_module = orig_current_module;
2018
2017
result
@@ -2518,7 +2517,7 @@ impl<'a> Resolver<'a> {
2518
2517
// If there is a TraitRef in scope for an impl, then the method must be in the
2519
2518
// trait.
2520
2519
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 ( ) {
2522
2521
let path = & self . current_trait_ref . as_ref ( ) . unwrap ( ) . 1 . path ;
2523
2522
resolve_error ( self , span, err ( ident. name , & path_names_to_string ( path) ) ) ;
2524
2523
}
@@ -3225,7 +3224,7 @@ impl<'a> Resolver<'a> {
3225
3224
} ;
3226
3225
}
3227
3226
}
3228
- let is_global = self . global_macros . get ( & path[ 0 ] . name ) . cloned ( )
3227
+ let is_global = self . macro_prelude . get ( & path[ 0 ] . name ) . cloned ( )
3229
3228
. map ( |binding| binding. get_macro ( self ) . kind ( ) == MacroKind :: Bang ) . unwrap_or ( false ) ;
3230
3229
if primary_ns != MacroNS && ( is_global ||
3231
3230
self . macro_names . contains ( & path[ 0 ] . modern ( ) ) ) {
@@ -3468,7 +3467,7 @@ impl<'a> Resolver<'a> {
3468
3467
}
3469
3468
3470
3469
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)
3472
3471
} else if opt_ns == Some ( MacroNS ) {
3473
3472
self . resolve_lexical_macro_path_segment ( ident, ns, record_used, path_span)
3474
3473
. map ( MacroBinding :: binding)
@@ -3762,7 +3761,7 @@ impl<'a> Resolver<'a> {
3762
3761
// Look for associated items in the current trait.
3763
3762
if let Some ( ( module, _) ) = self . current_trait_ref {
3764
3763
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 ) {
3766
3765
let def = binding. def ( ) ;
3767
3766
if filter_fn ( def) {
3768
3767
return Some ( if self . has_self . contains ( & def. def_id ( ) ) {
@@ -4075,7 +4074,7 @@ impl<'a> Resolver<'a> {
4075
4074
let mut found_traits = Vec :: new ( ) ;
4076
4075
// Look for the current trait.
4077
4076
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 ( ) {
4079
4078
let def_id = module. def_id ( ) . unwrap ( ) ;
4080
4079
found_traits. push ( TraitCandidate { def_id : def_id, import_id : None } ) ;
4081
4080
}
0 commit comments