File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
tests/run-make/reset-codegen-1 Expand file tree Collapse file tree 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,
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};
1011use std:: fs;
1112
1213fn 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 }
You can’t perform that action at this time.
0 commit comments