Skip to content

Commit d720298

Browse files
committed
compiletest: compile rmake.rs with -Dunused_must_use
1 parent 61097c7 commit d720298

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
@@ -3530,6 +3530,10 @@ impl<'test> TestCx<'test> {
35303530
.env_remove("MFLAGS")
35313531
.env_remove("CARGO_MAKEFLAGS");
35323532

3533+
// In test code we want to be very pedantic about values being silently discarded that are
3534+
// annotated with `#[must_use]`.
3535+
cmd.arg("-Dunused_must_use");
3536+
35333537
if std::env::var_os("COMPILETEST_FORCE_STAGE0").is_some() {
35343538
let mut stage0_sysroot = build_root.clone();
35353539
stage0_sysroot.push("stage0-sysroot");

0 commit comments

Comments
 (0)