Skip to content

Commit

Permalink
fix lifetime error and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed May 21, 2024
1 parent 4c42e8f commit 4a9e416
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/run-make/reset-codegen-1/rmake.rs
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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);
}
Expand Down

0 comments on commit 4a9e416

Please sign in to comment.