diff --git a/tests/run-make/reset-codegen-1/rmake.rs b/tests/run-make/reset-codegen-1/rmake.rs index fa2b8b713187a..2ed9d90ec27f4 100644 --- a/tests/run-make/reset-codegen-1/rmake.rs +++ b/tests/run-make/reset-codegen-1/rmake.rs @@ -1,7 +1,8 @@ -// When rustc receives 4 codegen-units, an output path and an emit flag all simultaneously, +// When rustc received 4 codegen-units, an output path and an emit flag all simultaneously, // this could cause an annoying recompilation issue, uselessly lengthening the build process. -// This test tries to reproduce this issue with varied emit flags - if it passes, the codegen-units -// are being appropriately reset to 1 after each pass. +// A fix was delivered, which resets codegen-units to 1 when necessary, +// but as it directly affected the way codegen-units are manipulated, +// this test was created to check that this fix did not cause compilation failures. // See https://github.com/rust-lang/rust/issues/30063 //@ ignore-cross-compile @@ -10,7 +11,8 @@ use run_make_support::{rustc, tmp_dir}; use std::fs; fn compile(emit: Option<&str>, output_dir: &str) { - let mut rustc = rustc().codegen_units(4).output(tmp_dir().join(output_dir)).input("foo.rs"); + let rustc = rustc(); + let rustc = rustc.codegen_units(4).output(tmp_dir().join(output_dir)).input("foo.rs"); if let Some(emit) = emit { rustc.emit(emit); }