Skip to content

Commit 30e91b5

Browse files
committed
address suggestions from acrichto
1 parent 2456da6 commit 30e91b5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/cargo/ops/cargo_rustc/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,9 +850,9 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
850850
self.lib_profile()
851851
}
852852

853-
pub fn incremental_args(&self, _unit: &Unit) -> CargoResult<Vec<String>> {
853+
pub fn incremental_args(&self, unit: &Unit) -> CargoResult<Vec<String>> {
854854
if self.incremental_enabled {
855-
Ok(vec![format!("-Zincremental={}", self.host.incremental().display())])
855+
Ok(vec![format!("-Zincremental={}", self.layout(unit.kind).incremental().display())])
856856
} else {
857857
Ok(vec![])
858858
}

tests/build.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ fn cargo_compile_incremental() {
4444
assert_that(
4545
p.cargo_process("build").arg("-v").env("CARGO_INCREMENTAL", "1"),
4646
execs().with_stderr_contains(
47-
" Running `rustc [..] -Zincremental=[..]/target/debug/incremental`\n"));
47+
"[RUNNING] `rustc [..] -Zincremental=[..][/]target[/]debug[/]incremental`\n")
48+
.with_status(0));
4849

4950
assert_that(
5051
p.cargo_process("test").arg("-v").env("CARGO_INCREMENTAL", "1"),
5152
execs().with_stderr_contains(
52-
" Running `rustc [..] -Zincremental=[..]/target/debug/incremental`\n"));
53+
"[RUNNING] `rustc [..] -Zincremental=[..][/]target[/]debug[/]incremental`\n")
54+
.with_status(0));
5355
}
5456

5557
#[test]

0 commit comments

Comments
 (0)