@@ -645,21 +645,6 @@ pub fn phase_2_configure_and_expand(sess: &Session,
645645 ret
646646 } ) ;
647647
648- // Needs to go *after* expansion to be able to check the results
649- // of macro expansion. This runs before #[cfg] to try to catch as
650- // much as possible (e.g. help the programmer avoid platform
651- // specific differences)
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-
663648 // JBC: make CFG processing part of expansion to avoid this problem:
664649
665650 // strip again, in case expansion added anything with a #[cfg].
@@ -698,10 +683,8 @@ pub fn phase_2_configure_and_expand(sess: &Session,
698683 "checking for inline asm in case the target doesn't support it" ,
699684 || no_asm:: check_crate ( sess, & krate) ) ;
700685
701- // One final feature gating of the true AST that gets compiled
702- // later, to make sure we've got everything (e.g. configuration
703- // can insert new attributes via `cfg_attr`)
704- time ( time_passes, "complete gated feature checking 2" , || {
686+ // Needs to go *after* expansion to be able to check the results of macro expansion.
687+ time ( time_passes, "complete gated feature checking" , || {
705688 sess. track_errors ( || {
706689 let features = syntax:: feature_gate:: check_crate ( sess. codemap ( ) ,
707690 & sess. parse_sess . span_diagnostic ,
0 commit comments