Commit 4a9e416 1 parent 4c42e8f commit 4a9e416 Copy full SHA for 4a9e416
File tree 1 file changed +6
-4
lines changed
tests/run-make/reset-codegen-1
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 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,
2
2
// 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.
5
6
// See https://github.com/rust-lang/rust/issues/30063
6
7
7
8
//@ ignore-cross-compile
@@ -10,7 +11,8 @@ use run_make_support::{rustc, tmp_dir};
10
11
use std:: fs;
11
12
12
13
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" ) ;
14
16
if let Some ( emit) = emit {
15
17
rustc. emit ( emit) ;
16
18
}
You can’t perform that action at this time.
0 commit comments