Skip to content

Commit

Permalink
Rollup merge of rust-lang#129928 - RalfJung:rustc_driver_impl-crt-sta…
Browse files Browse the repository at this point in the history
…tic, r=compiler-errors

rustc_driver_impl: remove some old dead logic

This got added in rust-lang@5013952, before `cfg(target_feature)` was stable. It should not be needed any more ever since `cfg(target_feature)` is stable.
  • Loading branch information
matthiaskrgr authored Sep 3, 2024
2 parents 7a8ffbc + aa1f60e commit b447cd5
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ use rustc_session::lint::{Lint, LintId};
use rustc_session::output::collect_crate_types;
use rustc_session::{config, filesearch, EarlyDiagCtxt, Session};
use rustc_span::source_map::FileLoader;
use rustc_span::symbol::sym;
use rustc_span::FileName;
use rustc_target::json::ToJson;
use rustc_target::spec::{Target, TargetTriple};
Expand Down Expand Up @@ -777,16 +776,8 @@ fn print_crate_info(
.config
.iter()
.filter_map(|&(name, value)| {
// Note that crt-static is a specially recognized cfg
// directive that's printed out here as part of
// rust-lang/rust#37406, but in general the
// `target_feature` cfg is gated under
// rust-lang/rust#29717. For now this is just
// specifically allowing the crt-static cfg and that's
// it, this is intended to get into Cargo and then go
// through to build scripts.
if (name != sym::target_feature || value != Some(sym::crt_dash_static))
&& !sess.is_nightly_build()
// On stable, exclude unstable flags.
if !sess.is_nightly_build()
&& find_gated_cfg(|cfg_sym| cfg_sym == name).is_some()
{
return None;
Expand Down

0 comments on commit b447cd5

Please sign in to comment.