Skip to content

Commit 0b4715e

Browse files
authored
Rollup merge of #124915 - nnethercote:rustc_target-cleanups, r=bjorn3
`rustc_target` cleanups Minor improvement I found while looking at this code. r? ```@lqd```
2 parents f3f9f0c + 69b86f6 commit 0b4715e

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

compiler/rustc_target/src/lib.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@
77
//! more 'stuff' here in the future. It does not have a dependency on
88
//! LLVM.
99
10+
// tidy-alphabetical-start
11+
#![allow(internal_features)]
1012
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1113
#![doc(rust_logo)]
12-
#![feature(min_exhaustive_patterns)]
13-
#![feature(rustdoc_internals)]
1414
#![feature(assert_matches)]
1515
#![feature(iter_intersperse)]
1616
#![feature(let_chains)]
17+
#![feature(min_exhaustive_patterns)]
1718
#![feature(rustc_attrs)]
18-
#![feature(step_trait)]
19-
#![allow(internal_features)]
19+
#![feature(rustdoc_internals)]
20+
// tidy-alphabetical-end
2021

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

compiler/rustc_target/src/spec/mod.rs

-13
Original file line numberDiff line numberDiff line change
@@ -603,19 +603,6 @@ impl LinkSelfContainedDefault {
603603
self == LinkSelfContainedDefault::False
604604
}
605605

606-
/// Returns whether the target spec explicitly requests self-contained linking, i.e. not via
607-
/// inference.
608-
pub fn is_linker_enabled(self) -> bool {
609-
match self {
610-
LinkSelfContainedDefault::True => true,
611-
LinkSelfContainedDefault::False => false,
612-
LinkSelfContainedDefault::WithComponents(c) => {
613-
c.contains(LinkSelfContainedComponents::LINKER)
614-
}
615-
_ => false,
616-
}
617-
}
618-
619606
/// Returns the key to use when serializing the setting to json:
620607
/// - individual components in a `link-self-contained` object value
621608
/// - the other variants as a backwards-compatible `crt-objects-fallback` string

0 commit comments

Comments
 (0)