We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d7e97c commit 9ca2121Copy full SHA for 9ca2121
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