Skip to content

Commit cf17c9f

Browse files
committed
Auto merge of #4010 - jonhoo:better-incremental-nightly-test, r=alexcrichton
Bring test of nightly in line with tests #4000 passes `-Zincremental` to `rustc` only on nightly, but uses a different mechanism for detecting nightly than [cargotest does](https://github.com/rust-lang/cargo/blob/9bf9bddd9297cfb5098be6146d85be551c6d4eff/tests/cargotest/lib.rs#L37). This PR brings the two in line, which should hopefully fix the build failure observed in rust-lang/rust#41830 (comment).
2 parents 9bf9bdd + 213a2bf commit cf17c9f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cargo/ops/cargo_rustc/context.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,10 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
8888
// ignore CARGO_INCREMENTAL on anything but nightly. This allows users
8989
// to always have CARGO_INCREMENTAL set without getting unexpected
9090
// errors on stable/beta builds.
91-
let incremental_enabled = incremental_enabled
92-
&& config.rustc()?.verbose_version.contains("nightly");
91+
let is_nightly =
92+
config.rustc()?.verbose_version.contains("-nightly") ||
93+
config.rustc()?.verbose_version.contains("-dev");
94+
let incremental_enabled = incremental_enabled && is_nightly;
9395

9496
Ok(Context {
9597
ws: ws,

0 commit comments

Comments
 (0)