File tree 2 files changed +0
-23
lines changed
2 files changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -747,10 +747,6 @@ pub fn phase_2_configure_and_expand(sess: &Session,
747
747
"prelude injection" ,
748
748
|| syntax:: std_inject:: maybe_inject_prelude ( & sess. parse_sess , krate) ) ;
749
749
750
- time ( time_passes,
751
- "checking that all macro invocations are gone" ,
752
- || syntax:: ext:: expand:: check_for_macros ( & sess. parse_sess , & krate) ) ;
753
-
754
750
time ( time_passes,
755
751
"checking for inline asm in case the target doesn't support it" ,
756
752
|| no_asm:: check_crate ( sess, & krate) ) ;
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ use feature_gate::{self, Features};
25
25
use fold;
26
26
use fold:: * ;
27
27
use util:: move_map:: MoveMap ;
28
- use parse;
29
28
use parse:: token:: { fresh_mark, fresh_name, intern, keywords} ;
30
29
use ptr:: P ;
31
30
use util:: small_vector:: SmallVector ;
@@ -1212,24 +1211,6 @@ fn mark_tts(tts: &[TokenTree], m: Mrk) -> Vec<TokenTree> {
1212
1211
noop_fold_tts ( tts, & mut Marker { mark : m, expn_id : None } )
1213
1212
}
1214
1213
1215
- /// Check that there are no macro invocations left in the AST:
1216
- pub fn check_for_macros ( sess : & parse:: ParseSess , krate : & ast:: Crate ) {
1217
- visit:: walk_crate ( & mut MacroExterminator { sess : sess} , krate) ;
1218
- }
1219
-
1220
- /// A visitor that ensures that no macro invocations remain in an AST.
1221
- struct MacroExterminator < ' a > {
1222
- sess : & ' a parse:: ParseSess
1223
- }
1224
-
1225
- impl < ' a , ' v > Visitor < ' v > for MacroExterminator < ' a > {
1226
- fn visit_mac ( & mut self , mac : & ast:: Mac ) {
1227
- self . sess . span_diagnostic . span_bug ( mac. span ,
1228
- "macro exterminator: expected AST \
1229
- with no macro invocations") ;
1230
- }
1231
- }
1232
-
1233
1214
1234
1215
#[ cfg( test) ]
1235
1216
mod tests {
You can’t perform that action at this time.
0 commit comments