Skip to content

Commit

Permalink
Unrolled build for rust-lang#124915
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#124915 - nnethercote:rustc_target-cleanups, r=bjorn3

`rustc_target` cleanups

Minor improvement I found while looking at this code.

r? ```@lqd```
  • Loading branch information
rust-timer committed May 10, 2024
2 parents 98dabb6 + 69b86f6 commit 951441a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
9 changes: 5 additions & 4 deletions compiler/rustc_target/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@
//! more 'stuff' here in the future. It does not have a dependency on
//! LLVM.

// tidy-alphabetical-start
#![allow(internal_features)]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(min_exhaustive_patterns)]
#![feature(rustdoc_internals)]
#![feature(assert_matches)]
#![feature(iter_intersperse)]
#![feature(let_chains)]
#![feature(min_exhaustive_patterns)]
#![feature(rustc_attrs)]
#![feature(step_trait)]
#![allow(internal_features)]
#![feature(rustdoc_internals)]
// tidy-alphabetical-end

use std::path::{Path, PathBuf};

Expand Down
13 changes: 0 additions & 13 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,19 +603,6 @@ impl LinkSelfContainedDefault {
self == LinkSelfContainedDefault::False
}

/// Returns whether the target spec explicitly requests self-contained linking, i.e. not via
/// inference.
pub fn is_linker_enabled(self) -> bool {
match self {
LinkSelfContainedDefault::True => true,
LinkSelfContainedDefault::False => false,
LinkSelfContainedDefault::WithComponents(c) => {
c.contains(LinkSelfContainedComponents::LINKER)
}
_ => false,
}
}

/// Returns the key to use when serializing the setting to json:
/// - individual components in a `link-self-contained` object value
/// - the other variants as a backwards-compatible `crt-objects-fallback` string
Expand Down

0 comments on commit 951441a

Please sign in to comment.