Skip to content

Commit 30be8bc

Browse files
committed
Remove --cfg no_unstable_features
1 parent 3d54358 commit 30be8bc

File tree

2 files changed

+9
-47
lines changed

2 files changed

+9
-47
lines changed

build_system/tests.rs

+4-32
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ pub(crate) fn run_tests(
329329
struct TestRunner<'a> {
330330
is_native: bool,
331331
jit_supported: bool,
332-
use_unstable_features: bool,
333332
skip_tests: &'a [&'a str],
334333
dirs: Dirs,
335334
target_compiler: Compiler,
@@ -361,15 +360,7 @@ impl<'a> TestRunner<'a> {
361360
&& target_compiler.triple.contains("x86_64")
362361
&& !target_compiler.triple.contains("windows");
363362

364-
Self {
365-
is_native,
366-
jit_supported,
367-
use_unstable_features,
368-
skip_tests,
369-
dirs,
370-
target_compiler,
371-
stdlib_source,
372-
}
363+
Self { is_native, jit_supported, skip_tests, dirs, target_compiler, stdlib_source }
373364
}
374365

375366
fn run_testsuite(&self, tests: &[TestCase]) {
@@ -393,31 +384,13 @@ impl<'a> TestRunner<'a> {
393384
match *cmd {
394385
TestCaseCmd::Custom { func } => func(self),
395386
TestCaseCmd::BuildLib { source, crate_types } => {
396-
if self.use_unstable_features {
397-
self.run_rustc([source, "--crate-type", crate_types]);
398-
} else {
399-
self.run_rustc([
400-
source,
401-
"--crate-type",
402-
crate_types,
403-
"--cfg",
404-
"no_unstable_features",
405-
]);
406-
}
387+
self.run_rustc([source, "--crate-type", crate_types]);
407388
}
408389
TestCaseCmd::BuildBin { source } => {
409-
if self.use_unstable_features {
410-
self.run_rustc([source]);
411-
} else {
412-
self.run_rustc([source, "--cfg", "no_unstable_features"]);
413-
}
390+
self.run_rustc([source]);
414391
}
415392
TestCaseCmd::BuildBinAndRun { source, args } => {
416-
if self.use_unstable_features {
417-
self.run_rustc([source]);
418-
} else {
419-
self.run_rustc([source, "--cfg", "no_unstable_features"]);
420-
}
393+
self.run_rustc([source]);
421394
self.run_out_command(
422395
source.split('/').last().unwrap().split('.').next().unwrap(),
423396
args,
@@ -472,7 +445,6 @@ impl<'a> TestRunner<'a> {
472445
cmd.arg(&self.target_compiler.triple);
473446
cmd.arg("-Cpanic=abort");
474447
cmd.arg("-Zunstable-options");
475-
cmd.arg("--check-cfg=cfg(no_unstable_features)");
476448
cmd.arg("--check-cfg=cfg(jit)");
477449
cmd.args(args);
478450
cmd

example/mini_core_hello_world.rs

+5-15
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,7 @@ fn main() {
333333
#[cfg(all(not(jit), not(all(windows, target_env = "gnu"))))]
334334
test_tls();
335335

336-
#[cfg(all(
337-
not(jit),
338-
not(no_unstable_features),
339-
target_arch = "x86_64",
340-
any(target_os = "linux", target_os = "macos")
341-
))]
336+
#[cfg(all(not(jit), target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))]
342337
unsafe {
343338
global_asm_test();
344339
naked_test();
@@ -367,17 +362,12 @@ fn stack_val_align() {
367362
assert_eq!(&a as *const Foo as usize % 8192, 0);
368363
}
369364

370-
#[cfg(all(
371-
not(jit),
372-
not(no_unstable_features),
373-
target_arch = "x86_64",
374-
any(target_os = "linux", target_os = "macos")
375-
))]
365+
#[cfg(all(not(jit), target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))]
376366
extern "C" {
377367
fn global_asm_test();
378368
}
379369

380-
#[cfg(all(not(jit), not(no_unstable_features), target_arch = "x86_64", target_os = "linux"))]
370+
#[cfg(all(not(jit), target_arch = "x86_64", target_os = "linux"))]
381371
global_asm! {
382372
"
383373
.global global_asm_test
@@ -387,7 +377,7 @@ global_asm! {
387377
"
388378
}
389379

390-
#[cfg(all(not(jit), not(no_unstable_features), target_arch = "x86_64", target_os = "macos"))]
380+
#[cfg(all(not(jit), target_arch = "x86_64", target_os = "macos"))]
391381
global_asm! {
392382
"
393383
.global _global_asm_test
@@ -397,7 +387,7 @@ global_asm! {
397387
"
398388
}
399389

400-
#[cfg(all(not(jit), not(no_unstable_features), target_arch = "x86_64"))]
390+
#[cfg(all(not(jit), target_arch = "x86_64"))]
401391
#[naked]
402392
extern "C" fn naked_test() {
403393
unsafe {

0 commit comments

Comments
 (0)