We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ea5e23 commit cc37e3cCopy full SHA for cc37e3c
src/tools/compiletest/src/runtest.rs
@@ -3551,6 +3551,10 @@ impl<'test> TestCx<'test> {
3551
.env("TARGET_RPATH_DIR", cwd.join(&self.config.run_lib_path))
3552
.env("LLVM_COMPONENTS", &self.config.llvm_components);
3553
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
+
3558
if std::env::var_os("COMPILETEST_FORCE_STAGE0").is_some() {
3559
let mut stage0_sysroot = build_root.clone();
3560
stage0_sysroot.push("stage0-sysroot");
0 commit comments