Skip to content

Commit a74d6c2

Browse files
committed
Only apply --cap-lints to the extended_sysroot test suite
1 parent 72e6f0c commit a74d6c2

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

build_system/tests.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ pub(crate) fn run_tests(
290290
&& !skip_tests.contains(&"testsuite.extended_sysroot");
291291

292292
if run_base_sysroot || run_extended_sysroot {
293-
let mut target_compiler = build_sysroot::build_sysroot(
293+
let target_compiler = build_sysroot::build_sysroot(
294294
dirs,
295295
channel,
296296
sysroot_kind,
@@ -299,11 +299,8 @@ pub(crate) fn run_tests(
299299
rustup_toolchain_name,
300300
target_triple.clone(),
301301
);
302-
// Rust's build system denies a couple of lints that trigger on several of the test
303-
// projects. Changing the code to fix them is not worth it, so just silence all lints.
304-
target_compiler.rustflags.push("--cap-lints=allow".to_owned());
305302

306-
let runner = TestRunner::new(
303+
let mut runner = TestRunner::new(
307304
dirs.clone(),
308305
target_compiler,
309306
use_unstable_features,
@@ -319,6 +316,9 @@ pub(crate) fn run_tests(
319316
}
320317

321318
if run_extended_sysroot {
319+
// Rust's build system denies a couple of lints that trigger on several of the test
320+
// projects. Changing the code to fix them is not worth it, so just silence all lints.
321+
runner.target_compiler.rustflags.push("--cap-lints=allow".to_owned());
322322
runner.run_testsuite(EXTENDED_SYSROOT_SUITE);
323323
} else {
324324
eprintln!("[SKIP] extended_sysroot tests");

example/alloc_example.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(start, core_intrinsics, alloc_error_handler, lang_items)]
2+
#![allow(internal_features)]
23
#![no_std]
34

45
extern crate alloc;

example/float-minmax-pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Test that the simd_f{min,max} intrinsics produce the correct results.
66

77
#![feature(repr_simd, core_intrinsics)]
8-
#![allow(non_camel_case_types)]
8+
#![allow(internal_features, non_camel_case_types)]
99

1010
#[repr(simd)]
1111
#[derive(Copy, Clone, PartialEq, Debug)]

example/mod_bench.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(start, core_intrinsics, lang_items)]
2+
#![allow(internal_features)]
23
#![no_std]
34

45
#[cfg_attr(unix, link(name = "c"))]

example/std_example.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
tuple_trait,
88
unboxed_closures
99
)]
10+
#![allow(internal_features)]
1011

1112
#[cfg(target_arch = "x86_64")]
1213
use std::arch::x86_64::*;

0 commit comments

Comments
 (0)