diff options
| author | Eric Huss <eric@huss.org> | 2021-05-28 16:40:22 -0700 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2021-05-28 16:40:22 -0700 |
| commit | e7411a26e4a247c86bb14ab37443bbad35c970b0 (patch) | |
| tree | 5b1bdc63fc10db62211f05598dcaad2414a15c4d /compiler/rustc_incremental | |
| parent | 834ec68821b0d911d1ba095518bc7763236216dc (diff) | |
| download | rust-e7411a26e4a247c86bb14ab37443bbad35c970b0.tar.gz rust-e7411a26e4a247c86bb14ab37443bbad35c970b0.zip | |
Add specific help for *how* to fix an incremental lock error.
Diffstat (limited to 'compiler/rustc_incremental')
| -rw-r--r-- | compiler/rustc_incremental/src/persist/fs.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/rustc_incremental/src/persist/fs.rs b/compiler/rustc_incremental/src/persist/fs.rs index a9925832fd8..83e80b55dae 100644 --- a/compiler/rustc_incremental/src/persist/fs.rs +++ b/compiler/rustc_incremental/src/persist/fs.rs @@ -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) |
