Skip to content

Commit a08b3c4

Browse files
committed
nit: rearrange and make match exhaustive
also indicate difference between out_dir and my_out
1 parent f122480 commit a08b3c4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/bootstrap/builder.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ impl<'a> Builder<'a> {
708708
let mut cargo = Command::new(&self.initial_cargo);
709709
let out_dir = self.stage_out(compiler, mode);
710710

711+
// command specific path, we call clear_if_dirty with this
711712
let mut my_out = match cmd {
712713
"build" => self.cargo_out(compiler, mode, target),
713714

@@ -753,20 +754,22 @@ impl<'a> Builder<'a> {
753754
Mode::Std => {
754755
self.clear_if_dirty(&my_out, &self.rustc(compiler));
755756
},
757+
Mode::Test => {
758+
self.clear_if_dirty(&my_out, &libstd_stamp);
759+
},
756760
Mode::Rustc => {
757761
self.clear_if_dirty(&my_out, &self.rustc(compiler));
758762
self.clear_if_dirty(&my_out, &libstd_stamp);
759763
self.clear_if_dirty(&my_out, &libtest_stamp);
760764
},
761-
Mode::Test => {
762-
self.clear_if_dirty(&my_out, &libstd_stamp);
763-
},
765+
Mode::Codegen => { },
766+
Mode::ToolStd => { },
767+
Mode::ToolTest => { },
764768
Mode::ToolRustc => {
765769
self.clear_if_dirty(&my_out, &libstd_stamp);
766770
self.clear_if_dirty(&my_out, &libtest_stamp);
767771
self.clear_if_dirty(&my_out, &librustc_stamp);
768-
}
769-
_ => { }
772+
},
770773
}
771774
}
772775

0 commit comments

Comments
 (0)