Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/cargo/ops/cargo_rustc/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
Err(_) => false,
};

// -Z can only be used on nightly builds; other builds complain loudly.
// Since incremental builds only work on nightly anyway, we silently
// ignore CARGO_INCREMENTAL on anything but nightly. This allows users
// to always have CARGO_INCREMENTAL set without getting unexpected
// errors on stable/beta builds.
let incremental_enabled = incremental_enabled
&& config.rustc()?.verbose_version.contains("nightly");

Ok(Context {
ws: ws,
host: host_layout,
Expand Down