Skip to content

Commit 66e9b7d

Browse files
committed
compiletest: compile rmake.rs with -Dunused_must_use
1 parent 90be77c commit 66e9b7d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/tools/compiletest/src/runtest.rs

+4
Original file line numberDiff line numberDiff line change
@@ -3517,6 +3517,10 @@ impl<'test> TestCx<'test> {
35173517
.env_remove("MFLAGS")
35183518
.env_remove("CARGO_MAKEFLAGS");
35193519

3520+
// In test code we want to be very pedantic about values being silently discarded that are
3521+
// annotated with `#[must_use]`.
3522+
cmd.arg("-Dunused_must_use");
3523+
35203524
if std::env::var_os("COMPILETEST_FORCE_STAGE0").is_some() {
35213525
let mut stage0_sysroot = build_root.clone();
35223526
stage0_sysroot.push("stage0-sysroot");

0 commit comments

Comments
 (0)