Function rustc_incremental::prepare_session_directory
[−]
[src]
pub fn prepare_session_directory(
sess: &Session,
crate_name: &str,
crate_disambiguator: CrateDisambiguator
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Allocates the private session directory. The boolean in the Ok() result
indicates whether we should try loading a dep graph from the successfully
initialized directory, or not.
The post-condition of this fn is that we have a valid incremental
compilation session directory, if the result is Ok
. A valid session
directory is one that contains a locked lock file. It may or may not contain
a dep-graph and work products from a previous session.
If the call fails, the fn may leave behind an invalid session directory.
The garbage collection will take care of it.