@@ -71,7 +71,6 @@ impl<'a> ToNameBinding<'a> for (Def, ty::Visibility, Span, Mark) {
7171struct LegacyMacroImports {
7272 import_all : Option < Span > ,
7373 imports : Vec < ( Name , Span ) > ,
74- reexports : Vec < ( Name , Span ) > ,
7574}
7675
7776impl < ' a > Resolver < ' a > {
@@ -621,7 +620,7 @@ impl<'a> Resolver<'a> {
621620 let legacy_imports = self . legacy_macro_imports ( & item. attrs ) ;
622621 let mut used = legacy_imports != LegacyMacroImports :: default ( ) ;
623622
624- // `#[macro_use]` and `#[macro_reexport]` are only allowed at the crate root.
623+ // `#[macro_use]` is only allowed at the crate root.
625624 if self . current_module . parent . is_some ( ) && used {
626625 span_err ! ( self . session, item. span, E0468 ,
627626 "an `extern crate` loading macros must be at the crate root" ) ;
@@ -669,17 +668,6 @@ impl<'a> Resolver<'a> {
669668 }
670669 }
671670 }
672- for ( name, span) in legacy_imports. reexports {
673- self . cstore . export_macros_untracked ( module. def_id ( ) . unwrap ( ) . krate ) ;
674- let ident = Ident :: with_empty_ctxt ( name) ;
675- let result = self . resolve_ident_in_module ( module, ident, MacroNS , false , false , span) ;
676- if let Ok ( binding) = result {
677- let ( def, vis) = ( binding. def ( ) , binding. vis ) ;
678- self . macro_exports . push ( Export { ident, def, vis, span, is_import : true } ) ;
679- } else {
680- span_err ! ( self . session, span, E0470 , "re-exported macro not found" ) ;
681- }
682- }
683671 used
684672 }
685673
@@ -721,21 +709,6 @@ impl<'a> Resolver<'a> {
721709 } ,
722710 None => imports. import_all = Some ( attr. span ) ,
723711 }
724- } else if attr. check_name ( "macro_reexport" ) {
725- let bad_macro_reexport = |this : & mut Self , span| {
726- span_err ! ( this. session, span, E0467 , "bad macro re-export" ) ;
727- } ;
728- if let Some ( names) = attr. meta_item_list ( ) {
729- for attr in names {
730- if let Some ( word) = attr. word ( ) {
731- imports. reexports . push ( ( word. ident . name , attr. span ( ) ) ) ;
732- } else {
733- bad_macro_reexport ( self , attr. span ( ) ) ;
734- }
735- }
736- } else {
737- bad_macro_reexport ( self , attr. span ( ) ) ;
738- }
739712 }
740713 }
741714 imports
0 commit comments