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 be572a8 commit 288c2deCopy full SHA for 288c2de
src/tools/compiletest/src/runtest.rs
@@ -3507,6 +3507,10 @@ impl<'test> TestCx<'test> {
3507
.env_remove("MFLAGS")
3508
.env_remove("CARGO_MAKEFLAGS");
3509
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
+
3514
if std::env::var_os("COMPILETEST_FORCE_STAGE0").is_some() {
3515
let mut stage0_sysroot = build_root.clone();
3516
stage0_sysroot.push("stage0-sysroot");
0 commit comments