Skip to content

Commit 4a9e416

Browse files
committed
fix lifetime error and comment
1 parent 4c42e8f commit 4a9e416

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/run-make/reset-codegen-1/rmake.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
// When rustc receives 4 codegen-units, an output path and an emit flag all simultaneously,
1+
// When rustc received 4 codegen-units, an output path and an emit flag all simultaneously,
22
// this could cause an annoying recompilation issue, uselessly lengthening the build process.
3-
// This test tries to reproduce this issue with varied emit flags - if it passes, the codegen-units
4-
// are being appropriately reset to 1 after each pass.
3+
// A fix was delivered, which resets codegen-units to 1 when necessary,
4+
// but as it directly affected the way codegen-units are manipulated,
5+
// this test was created to check that this fix did not cause compilation failures.
56
// See https://github.com/rust-lang/rust/issues/30063
67

78
//@ ignore-cross-compile
@@ -10,7 +11,8 @@ use run_make_support::{rustc, tmp_dir};
1011
use std::fs;
1112

1213
fn compile(emit: Option<&str>, output_dir: &str) {
13-
let mut rustc = rustc().codegen_units(4).output(tmp_dir().join(output_dir)).input("foo.rs");
14+
let rustc = rustc();
15+
let rustc = rustc.codegen_units(4).output(tmp_dir().join(output_dir)).input("foo.rs");
1416
if let Some(emit) = emit {
1517
rustc.emit(emit);
1618
}

0 commit comments

Comments
 (0)