@@ -61,7 +61,6 @@ use rustc_session::lint::{Lint, LintId};
6161use rustc_session:: output:: collect_crate_types;
6262use rustc_session:: { config, filesearch, EarlyDiagCtxt , Session } ;
6363use rustc_span:: source_map:: FileLoader ;
64- use rustc_span:: symbol:: sym;
6564use rustc_span:: FileName ;
6665use rustc_target:: json:: ToJson ;
6766use rustc_target:: spec:: { Target , TargetTriple } ;
@@ -777,16 +776,8 @@ fn print_crate_info(
777776 . config
778777 . iter( )
779778 . filter_map( |& ( name, value) | {
780- // Note that crt-static is a specially recognized cfg
781- // directive that's printed out here as part of
782- // rust-lang/rust#37406, but in general the
783- // `target_feature` cfg is gated under
784- // rust-lang/rust#29717. For now this is just
785- // specifically allowing the crt-static cfg and that's
786- // it, this is intended to get into Cargo and then go
787- // through to build scripts.
788- if ( name != sym:: target_feature || value != Some ( sym:: crt_dash_static) )
789- && !sess. is_nightly_build( )
779+ // On stable, exclude unstable flags.
780+ if !sess. is_nightly_build( )
790781 && find_gated_cfg( |cfg_sym| cfg_sym == name) . is_some( )
791782 {
792783 return None ;
0 commit comments