Struct rustc::ty::maps::OnDiskCache
[−]
[src]
pub struct OnDiskCache<'sess> { /* fields omitted */ }
🔬 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?
OnDiskCache
provides an interface to incr. comp. data cached from the
previous compilation session. This data will eventually include the results
of a few selected queries (like typeck_tables_of
and mir_optimized
) and
any diagnostics that have been emitted during a query.
Methods
impl<'sess> OnDiskCache<'sess>
[src]
pub fn new(
sess: &'sess Session,
data: Vec<u8>,
start_pos: usize
) -> OnDiskCache<'sess>
[src]
sess: &'sess Session,
data: Vec<u8>,
start_pos: usize
) -> OnDiskCache<'sess>
🔬 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?
Create a new OnDiskCache instance from the serialized data in data
.
pub fn new_empty(codemap: &'sess CodeMap) -> OnDiskCache<'sess>
[src]
🔬 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?
pub fn serialize<'a, 'tcx, E>(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
encoder: &mut E
) -> Result<(), E::Error> where
E: TyEncoder,
[src]
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
encoder: &mut E
) -> Result<(), E::Error> where
E: TyEncoder,
🔬 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?
pub fn load_diagnostics<'a, 'tcx>(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
dep_node_index: SerializedDepNodeIndex
) -> Vec<Diagnostic>
[src]
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
dep_node_index: SerializedDepNodeIndex
) -> Vec<Diagnostic>
🔬 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?
Load a diagnostic emitted during the previous compilation session.
pub fn store_diagnostics(
&self,
dep_node_index: DepNodeIndex,
diagnostics: Vec<Diagnostic>
)
[src]
&self,
dep_node_index: DepNodeIndex,
diagnostics: Vec<Diagnostic>
)
🔬 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?
Store a diagnostic emitted during the current compilation session.
Anything stored like this will be available via load_diagnostics
in
the next compilation session.
pub fn try_load_query_result<'tcx, T>(
&self,
tcx: TyCtxt<'_, 'tcx, 'tcx>,
dep_node_index: SerializedDepNodeIndex
) -> Option<T> where
T: Decodable,
[src]
&self,
tcx: TyCtxt<'_, 'tcx, 'tcx>,
dep_node_index: SerializedDepNodeIndex
) -> Option<T> where
T: Decodable,
🔬 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?
Returns the cached query result if there is something in the cache for the given SerializedDepNodeIndex. Otherwise returns None.
pub fn store_diagnostics_for_anon_node(
&self,
dep_node_index: DepNodeIndex,
diagnostics: Vec<Diagnostic>
)
[src]
&self,
dep_node_index: DepNodeIndex,
diagnostics: Vec<Diagnostic>
)
🔬 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?
Store a diagnostic emitted during computation of an anonymous query.
Since many anonymous queries can share the same DepNode
, we aggregate
them -- as opposed to regular queries where we assume that there is a
1:1 relationship between query-key and DepNode
.