Skip to content

Commit

Permalink
Add specific help for *how* to fix an incremental lock error.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed May 28, 2021
1 parent 834ec68 commit e7411a2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions compiler/rustc_incremental/src/persist/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,19 @@ fn lock_directory(
or disable incremental compilation",
session_dir.display()
));
if std::env::var_os("CARGO").is_some() {
err.help(
"incremental compilation can be disabled by setting the \
environment variable CARGO_INCREMENTAL=0 (see \
https://doc.rust-lang.org/cargo/reference/profiles.html#incremental)",
);
err.help(
"the entire build directory can be changed to a different \
filesystem by setting the environment variable CARGO_TARGET_DIR \
to a different path (see \
https://doc.rust-lang.org/cargo/reference/config.html#buildtarget-dir)",
);
}
}
err.emit();
Err(ErrorReported)
Expand Down

0 comments on commit e7411a2

Please sign in to comment.