@@ -458,21 +458,13 @@ impl<'a> Resolver<'a> {
458458 self . current_module = if module. is_trait ( ) { module. parent . unwrap ( ) } else { module } ;
459459
460460 // Possibly apply the macro helper hack
461- if self . use_extern_macros && kind == MacroKind :: Bang && path. len ( ) == 1 &&
461+ if kind == MacroKind :: Bang && path. len ( ) == 1 &&
462462 path[ 0 ] . span . ctxt ( ) . outer ( ) . expn_info ( ) . map_or ( false , |info| info. local_inner_macros ) {
463463 let root = Ident :: new ( keywords:: DollarCrate . name ( ) , path[ 0 ] . span ) ;
464464 path. insert ( 0 , root) ;
465465 }
466466
467467 if path. len ( ) > 1 {
468- if !self . use_extern_macros && self . gated_errors . insert ( span) {
469- let msg = "non-ident macro paths are experimental" ;
470- let feature = "use_extern_macros" ;
471- emit_feature_err ( & self . session . parse_sess , feature, span, GateIssue :: Language , msg) ;
472- self . found_unresolved_macro = true ;
473- return Err ( Determinacy :: Determined ) ;
474- }
475-
476468 let def = match self . resolve_path ( & path, Some ( MacroNS ) , false , span, CrateLint :: No ) {
477469 PathResult :: NonModule ( path_res) => match path_res. base_def ( ) {
478470 Def :: Err => Err ( Determinacy :: Determined ) ,
@@ -588,7 +580,6 @@ impl<'a> Resolver<'a> {
588580 record_used : bool )
589581 -> Option < MacroBinding < ' a > > {
590582 let ident = ident. modern ( ) ;
591- let mut possible_time_travel = None ;
592583 let mut relative_depth: u32 = 0 ;
593584 let mut binding = None ;
594585 loop {
@@ -598,9 +589,6 @@ impl<'a> Resolver<'a> {
598589 match invocation. expansion . get ( ) {
599590 LegacyScope :: Invocation ( _) => scope. set ( invocation. legacy_scope . get ( ) ) ,
600591 LegacyScope :: Empty => {
601- if possible_time_travel. is_none ( ) {
602- possible_time_travel = Some ( scope) ;
603- }
604592 scope = & invocation. legacy_scope ;
605593 }
606594 _ => {
@@ -615,7 +603,7 @@ impl<'a> Resolver<'a> {
615603 }
616604 LegacyScope :: Binding ( potential_binding) => {
617605 if potential_binding. ident == ident {
618- if ( ! self . use_extern_macros || record_used) && relative_depth > 0 {
606+ if record_used && relative_depth > 0 {
619607 self . disallowed_shadowing . push ( potential_binding) ;
620608 }
621609 binding = Some ( potential_binding) ;
@@ -629,21 +617,11 @@ impl<'a> Resolver<'a> {
629617 let binding = if let Some ( binding) = binding {
630618 MacroBinding :: Legacy ( binding)
631619 } else if let Some ( binding) = self . global_macros . get ( & ident. name ) . cloned ( ) {
632- if !self . use_extern_macros {
633- self . record_use ( ident, MacroNS , binding, DUMMY_SP ) ;
634- }
635620 MacroBinding :: Global ( binding)
636621 } else {
637622 return None ;
638623 } ;
639624
640- if !self . use_extern_macros {
641- if let Some ( scope) = possible_time_travel {
642- // Check for disallowed shadowing later
643- self . lexical_macro_resolutions . push ( ( ident, scope) ) ;
644- }
645- }
646-
647625 Some ( binding)
648626 }
649627
@@ -749,9 +727,6 @@ impl<'a> Resolver<'a> {
749727 find_best_match_for_name ( names, name, None )
750728 // Then check modules.
751729 } ) . or_else ( || {
752- if !self . use_extern_macros {
753- return None ;
754- }
755730 let is_macro = |def| {
756731 if let Def :: Macro ( _, def_kind) = def {
757732 def_kind == kind
0 commit comments