@@ -647,19 +647,6 @@ pub fn phase_2_configure_and_expand(sess: &Session,
647
647
krate
648
648
} ) ?;
649
649
650
- // Needs to go *after* expansion to be able to check the results
651
- // of macro expansion.
652
- time ( time_passes, "complete gated feature checking 1" , || {
653
- sess. track_errors ( || {
654
- let features = syntax:: feature_gate:: check_crate ( sess. codemap ( ) ,
655
- & sess. parse_sess . span_diagnostic ,
656
- & krate,
657
- & attributes,
658
- sess. opts . unstable_features ) ;
659
- * sess. features . borrow_mut ( ) = features;
660
- } )
661
- } ) ?;
662
-
663
650
krate = time ( time_passes, "maybe building test harness" , || {
664
651
syntax:: test:: modify_for_testing ( & sess. parse_sess , & sess. opts . cfg , krate, sess. diagnostic ( ) )
665
652
} ) ;
@@ -676,10 +663,8 @@ pub fn phase_2_configure_and_expand(sess: &Session,
676
663
"checking for inline asm in case the target doesn't support it" ,
677
664
|| no_asm:: check_crate ( sess, & krate) ) ;
678
665
679
- // One final feature gating of the true AST that gets compiled
680
- // later, to make sure we've got everything (e.g. configuration
681
- // can insert new attributes via `cfg_attr`)
682
- time ( time_passes, "complete gated feature checking 2" , || {
666
+ // Needs to go *after* expansion to be able to check the results of macro expansion.
667
+ time ( time_passes, "complete gated feature checking" , || {
683
668
sess. track_errors ( || {
684
669
let features = syntax:: feature_gate:: check_crate ( sess. codemap ( ) ,
685
670
& sess. parse_sess . span_diagnostic ,
0 commit comments