Skip to content

Commit 288c2de

Browse files
committed
compiletest: compile rmake.rs with -Dunused_must_use
1 parent be572a8 commit 288c2de

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3507,6 +3507,10 @@ impl<'test> TestCx<'test> {
35073507
.env_remove("MFLAGS")
35083508
.env_remove("CARGO_MAKEFLAGS");
35093509

3510+
// In test code we want to be very pedantic about values being silently discarded that are
3511+
// annotated with `#[must_use]`.
3512+
cmd.arg("-Dunused_must_use");
3513+
35103514
if std::env::var_os("COMPILETEST_FORCE_STAGE0").is_some() {
35113515
let mut stage0_sysroot = build_root.clone();
35123516
stage0_sysroot.push("stage0-sysroot");

0 commit comments

Comments
 (0)