@@ -714,7 +714,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
714714 }
715715 Scope :: MacroUsePrelude => match self . macro_use_prelude . get ( & ident. name ) . cloned ( ) {
716716 Some ( decl) => Ok ( decl) ,
717- None => Err ( Determinacy :: determined ( !self . graph_root . has_unexpanded_invocations ( ) ) ) ,
717+ None => {
718+ Err ( Determinacy :: determined ( !self . graph_root . has_unexpanded_invocations ( & self ) ) )
719+ }
718720 } ,
719721 Scope :: BuiltinAttrs => match self . builtin_attr_decls . get ( & ident. name ) {
720722 Some ( decl) => Ok ( * decl) ,
@@ -727,9 +729,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
727729 finalize. is_some ( ) ,
728730 ) {
729731 Some ( decl) => Ok ( decl) ,
730- None => {
731- Err ( Determinacy :: determined ( !self . graph_root . has_unexpanded_invocations ( ) ) )
732- }
732+ None => Err ( Determinacy :: determined (
733+ !self . graph_root . has_unexpanded_invocations ( & self ) ,
734+ ) ) ,
733735 }
734736 }
735737 Scope :: ExternPreludeFlags => {
@@ -1158,7 +1160,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
11581160
11591161 if let Some ( finalize) = finalize {
11601162 // finalize implies that the module is fully expanded
1161- assert ! ( !module. has_unexpanded_invocations( ) ) ;
1163+ assert ! ( !module. has_unexpanded_invocations( & self ) ) ;
11621164 return self . get_mut ( ) . finalize_module_binding (
11631165 ident,
11641166 orig_ident_span,
@@ -1195,7 +1197,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
11951197 }
11961198
11971199 // Check if one of unexpanded macros can still define the name.
1198- if module. has_unexpanded_invocations ( ) {
1200+ if module. has_unexpanded_invocations ( & self ) {
11991201 return Err ( ControlFlow :: Continue ( Undetermined ) ) ;
12001202 }
12011203
@@ -1224,7 +1226,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
12241226
12251227 if let Some ( finalize) = finalize {
12261228 // finalize implies that the module is fully expanded
1227- assert ! ( !module. has_unexpanded_invocations( ) ) ;
1229+ assert ! ( !module. has_unexpanded_invocations( & self ) ) ;
12281230 return self . get_mut ( ) . finalize_module_binding (
12291231 ident,
12301232 orig_ident_span,
@@ -1268,7 +1270,10 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
12681270 // and prohibit access to macro-expanded `macro_export` macros instead (unless restricted
12691271 // shadowing is enabled, see `macro_expanded_macro_export_errors`).
12701272 if let Some ( binding) = binding {
1271- return if binding. determined ( ) || ns == MacroNS || shadowing == Shadowing :: Restricted {
1273+ return if binding. determined ( & self )
1274+ || ns == MacroNS
1275+ || shadowing == Shadowing :: Restricted
1276+ {
12721277 let accessible = self . is_accessible_from ( binding. vis ( ) , parent_scope. module ) ;
12731278 if accessible { Ok ( binding) } else { Err ( ControlFlow :: Break ( Determined ) ) }
12741279 } else {
@@ -1283,13 +1288,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
12831288 // scopes we return `Undetermined` with `ControlFlow::Continue`.
12841289 // Check if one of unexpanded macros can still define the name,
12851290 // if it can then our "no resolution" result is not determined and can be invalidated.
1286- if module. has_unexpanded_invocations ( ) {
1291+ if module. has_unexpanded_invocations ( & self ) {
12871292 return Err ( ControlFlow :: Continue ( Undetermined ) ) ;
12881293 }
12891294
12901295 // Check if one of glob imports can still define the name,
12911296 // if it can then our "no resolution" result is not determined and can be invalidated.
1292- for glob_import in module. globs . borrow ( ) . iter ( ) {
1297+ for glob_import in module. globs . borrow ( & self ) . iter ( ) {
12931298 if ignore_import == Some ( * glob_import) {
12941299 continue ;
12951300 }
0 commit comments