@@ -12,7 +12,7 @@ use ast::{Block, Crate, Ident, Mac_, PatKind};
1212use ast:: { MacStmtStyle , StmtKind , ItemKind } ;
1313use ast;
1414use ext:: hygiene:: Mark ;
15- use ext:: placeholders:: { self , placeholder, PlaceholderExpander } ;
15+ use ext:: placeholders:: { placeholder, PlaceholderExpander } ;
1616use attr:: { self , HasAttrs } ;
1717use codemap:: { ExpnInfo , NameAndSpan , MacroBang , MacroAttribute } ;
1818use syntax_pos:: { self , Span , ExpnId } ;
@@ -377,46 +377,6 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
377377 kind. make_from ( expander. expand ( self . cx , span, ident, marked_tts, attrs) )
378378 }
379379
380- MacroRulesTT => {
381- if ident. name == keywords:: Invalid . name ( ) {
382- self . cx . span_err ( path. span ,
383- & format ! ( "macro {}! expects an ident argument" , extname) ) ;
384- return kind. dummy ( span) ;
385- } ;
386-
387- self . cx . bt_push ( ExpnInfo {
388- call_site : span,
389- callee : NameAndSpan {
390- format : MacroBang ( extname) ,
391- span : None ,
392- // `macro_rules!` doesn't directly allow unstable
393- // (this is orthogonal to whether the macro it creates allows it)
394- allow_internal_unstable : false ,
395- }
396- } ) ;
397-
398- let def = ast:: MacroDef {
399- ident : ident,
400- id : ast:: DUMMY_NODE_ID ,
401- span : span,
402- imported_from : None ,
403- use_locally : true ,
404- body : marked_tts,
405- export : attr:: contains_name ( & attrs, "macro_export" ) ,
406- allow_internal_unstable : attr:: contains_name ( & attrs, "allow_internal_unstable" ) ,
407- attrs : attrs,
408- } ;
409-
410- self . cx . insert_macro ( def. clone ( ) ) ;
411-
412- // If keep_macs is true, expands to a MacEager::items instead.
413- if self . cx . ecfg . keep_macs {
414- Some ( placeholders:: reconstructed_macro_rules ( & def, & path) )
415- } else {
416- Some ( placeholders:: macro_scope_placeholder ( ) )
417- }
418- }
419-
420380 MultiDecorator ( ..) | MultiModifier ( ..) => {
421381 self . cx . span_err ( path. span ,
422382 & format ! ( "`{}` can only be used in attributes" , extname) ) ;
0 commit comments