We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90be77c commit 66e9b7dCopy full SHA for 66e9b7d
src/tools/compiletest/src/runtest.rs
@@ -3517,6 +3517,10 @@ impl<'test> TestCx<'test> {
3517
.env_remove("MFLAGS")
3518
.env_remove("CARGO_MAKEFLAGS");
3519
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
+
3524
if std::env::var_os("COMPILETEST_FORCE_STAGE0").is_some() {
3525
let mut stage0_sysroot = build_root.clone();
3526
stage0_sysroot.push("stage0-sysroot");
0 commit comments