Skip to content

Commit cc37e3c

Browse files
committed
compiletest: compile rmake.rs with -Dunused_must_use
1 parent 3ea5e23 commit cc37e3c

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
@@ -3551,6 +3551,10 @@ impl<'test> TestCx<'test> {
35513551
.env("TARGET_RPATH_DIR", cwd.join(&self.config.run_lib_path))
35523552
.env("LLVM_COMPONENTS", &self.config.llvm_components);
35533553

3554+
// In test code we want to be very pedantic about values being silently discarded that are
3555+
// annotated with `#[must_use]`.
3556+
cmd.arg("-Dunused_must_use");
3557+
35543558
if std::env::var_os("COMPILETEST_FORCE_STAGE0").is_some() {
35553559
let mut stage0_sysroot = build_root.clone();
35563560
stage0_sysroot.push("stage0-sysroot");

0 commit comments

Comments
 (0)