Remove --cfg no_unstable_features
This commit is contained in:
parent
3d54358b64
commit
30be8bcb45
@ -329,7 +329,6 @@ pub(crate) fn run_tests(
|
||||
struct TestRunner<'a> {
|
||||
is_native: bool,
|
||||
jit_supported: bool,
|
||||
use_unstable_features: bool,
|
||||
skip_tests: &'a [&'a str],
|
||||
dirs: Dirs,
|
||||
target_compiler: Compiler,
|
||||
@ -361,15 +360,7 @@ fn new(
|
||||
&& target_compiler.triple.contains("x86_64")
|
||||
&& !target_compiler.triple.contains("windows");
|
||||
|
||||
Self {
|
||||
is_native,
|
||||
jit_supported,
|
||||
use_unstable_features,
|
||||
skip_tests,
|
||||
dirs,
|
||||
target_compiler,
|
||||
stdlib_source,
|
||||
}
|
||||
Self { is_native, jit_supported, skip_tests, dirs, target_compiler, stdlib_source }
|
||||
}
|
||||
|
||||
fn run_testsuite(&self, tests: &[TestCase]) {
|
||||
@ -393,31 +384,13 @@ fn run_testsuite(&self, tests: &[TestCase]) {
|
||||
match *cmd {
|
||||
TestCaseCmd::Custom { func } => func(self),
|
||||
TestCaseCmd::BuildLib { source, crate_types } => {
|
||||
if self.use_unstable_features {
|
||||
self.run_rustc([source, "--crate-type", crate_types]);
|
||||
} else {
|
||||
self.run_rustc([
|
||||
source,
|
||||
"--crate-type",
|
||||
crate_types,
|
||||
"--cfg",
|
||||
"no_unstable_features",
|
||||
]);
|
||||
}
|
||||
}
|
||||
TestCaseCmd::BuildBin { source } => {
|
||||
if self.use_unstable_features {
|
||||
self.run_rustc([source]);
|
||||
} else {
|
||||
self.run_rustc([source, "--cfg", "no_unstable_features"]);
|
||||
}
|
||||
}
|
||||
TestCaseCmd::BuildBinAndRun { source, args } => {
|
||||
if self.use_unstable_features {
|
||||
self.run_rustc([source]);
|
||||
} else {
|
||||
self.run_rustc([source, "--cfg", "no_unstable_features"]);
|
||||
}
|
||||
self.run_out_command(
|
||||
source.split('/').last().unwrap().split('.').next().unwrap(),
|
||||
args,
|
||||
@ -472,7 +445,6 @@ fn rustc_command<I, S>(&self, args: I) -> Command
|
||||
cmd.arg(&self.target_compiler.triple);
|
||||
cmd.arg("-Cpanic=abort");
|
||||
cmd.arg("-Zunstable-options");
|
||||
cmd.arg("--check-cfg=cfg(no_unstable_features)");
|
||||
cmd.arg("--check-cfg=cfg(jit)");
|
||||
cmd.args(args);
|
||||
cmd
|
||||
|
@ -333,12 +333,7 @@ struct ExternTypeWrapper {
|
||||
#[cfg(all(not(jit), not(all(windows, target_env = "gnu"))))]
|
||||
test_tls();
|
||||
|
||||
#[cfg(all(
|
||||
not(jit),
|
||||
not(no_unstable_features),
|
||||
target_arch = "x86_64",
|
||||
any(target_os = "linux", target_os = "macos")
|
||||
))]
|
||||
#[cfg(all(not(jit), target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))]
|
||||
unsafe {
|
||||
global_asm_test();
|
||||
naked_test();
|
||||
@ -367,17 +362,12 @@ fn stack_val_align() {
|
||||
assert_eq!(&a as *const Foo as usize % 8192, 0);
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
not(jit),
|
||||
not(no_unstable_features),
|
||||
target_arch = "x86_64",
|
||||
any(target_os = "linux", target_os = "macos")
|
||||
))]
|
||||
#[cfg(all(not(jit), target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))]
|
||||
extern "C" {
|
||||
fn global_asm_test();
|
||||
}
|
||||
|
||||
#[cfg(all(not(jit), not(no_unstable_features), target_arch = "x86_64", target_os = "linux"))]
|
||||
#[cfg(all(not(jit), target_arch = "x86_64", target_os = "linux"))]
|
||||
global_asm! {
|
||||
"
|
||||
.global global_asm_test
|
||||
@ -387,7 +377,7 @@ fn stack_val_align() {
|
||||
"
|
||||
}
|
||||
|
||||
#[cfg(all(not(jit), not(no_unstable_features), target_arch = "x86_64", target_os = "macos"))]
|
||||
#[cfg(all(not(jit), target_arch = "x86_64", target_os = "macos"))]
|
||||
global_asm! {
|
||||
"
|
||||
.global _global_asm_test
|
||||
@ -397,7 +387,7 @@ fn stack_val_align() {
|
||||
"
|
||||
}
|
||||
|
||||
#[cfg(all(not(jit), not(no_unstable_features), target_arch = "x86_64"))]
|
||||
#[cfg(all(not(jit), target_arch = "x86_64"))]
|
||||
#[naked]
|
||||
extern "C" fn naked_test() {
|
||||
unsafe {
|
||||
|
Loading…
Reference in New Issue
Block a user