Struct cargo::util::rustc::Cache

source ·
struct Cache {
    cache_location: Option<PathBuf>,
    dirty: bool,
    data: CacheData,
}
Expand description

It is a well known fact that rustc is not the fastest compiler in the world. What is less known is that even rustc --version --verbose takes about a hundred milliseconds! Because we need compiler version info even for no-op builds, we cache it here, based on compiler’s mtime and rustup’s current toolchain.

https://github.com/rust-lang/cargo/issues/5315 https://github.com/rust-lang/rust/issues/49761

Fields§

§cache_location: Option<PathBuf>§dirty: bool§data: CacheData

Implementations§

Trait Implementations§

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 136 bytes