Skip to content

Commit 6dadb94

Browse files
committed
test suite: be fine with warnings when running on rustc CI
1 parent 0347e1b commit 6dadb94

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/compiletest.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ fn rustc_lib_path() -> PathBuf {
2626

2727
fn run_tests(mode: &str, path: &str, target: &str, mut flags: Vec<String>) {
2828
// Some flags we always want.
29-
flags.push("-Dwarnings -Dunused".to_owned()); // overwrite the -Aunused in compiletest-rs
29+
if rustc_test_suite().is_none() {
30+
// Only `-Dwarnings` on the Miri side to make the rustc toolstate management less painful.
31+
// (We often get warnings when e.g. a feature gets stabilized or some lint gets added/improved.)
32+
flags.push("-Dwarnings -Dunused".to_owned()); // overwrite the -Aunused in compiletest-rs
33+
}
3034
flags.push("--edition 2018".to_owned());
3135
if let Ok(sysroot) = std::env::var("MIRI_SYSROOT") {
3236
flags.push(format!("--sysroot {}", sysroot));

0 commit comments

Comments
 (0)