Struct rustc::dep_graph::DepGraph
[−]
[src]
pub struct DepGraph { /* 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?
Methods
impl DepGraph
[src]
pub fn new(prev_graph: PreviousDepGraph) -> DepGraph
[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 new_disabled() -> DepGraph
[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 is_fully_enabled(&self) -> bool
[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?
True if we are actually building the full dep-graph.
pub fn query(&self) -> DepGraphQuery
[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 in_ignore<'graph>(&'graph self) -> Option<IgnoreTask<'graph>>
[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 with_ignore<OP, R>(&self, op: OP) -> R where
OP: FnOnce() -> R,
[src]
OP: FnOnce() -> R,
🔬 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 with_task<C, A, R, HCX>(
&self,
key: DepNode,
cx: C,
arg: A,
task: fn(_: C, _: A) -> R
) -> (R, DepNodeIndex) where
C: DepGraphSafe + StableHashingContextProvider<ContextType = HCX>,
R: HashStable<HCX>,
[src]
&self,
key: DepNode,
cx: C,
arg: A,
task: fn(_: C, _: A) -> R
) -> (R, DepNodeIndex) where
C: DepGraphSafe + StableHashingContextProvider<ContextType = HCX>,
R: HashStable<HCX>,
🔬 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?
Starts a new dep-graph task. Dep-graph tasks are specified
using a free function (task
) and not a closure -- this
is intentional because we want to exercise tight control over
what state they have access to. In particular, we want to
prevent implicit 'leaks' of tracked state into the task (which
could then be read without generating correct edges in the
dep-graph -- see the module-level README for more details on the
dep-graph). To this end, the task function gets exactly two
pieces of state: the context cx
and an argument arg
. Both
of these bits of state must be of some type that implements
DepGraphSafe
and hence does not leak.
The choice of two arguments is not fundamental. One argument
would work just as well, since multiple values can be
collected using tuples. However, using two arguments works out
to be quite convenient, since it is common to need a context
(cx
) and some argument (e.g., a DefId
identifying what
item to process).
For cases where you need some other number of arguments:
- If you only need one argument, just use
()
for thearg
parameter. - If you need 3+ arguments, use a tuple for the
arg
parameter.
pub fn with_anon_task<OP, R>(
&self,
dep_kind: DepKind,
op: OP
) -> (R, DepNodeIndex) where
OP: FnOnce() -> R,
[src]
&self,
dep_kind: DepKind,
op: OP
) -> (R, DepNodeIndex) where
OP: FnOnce() -> R,
🔬 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?
Execute something within an "anonymous" task, that is, a task the DepNode of which is determined by the list of inputs it read from.
pub fn with_eval_always_task<C, A, R, HCX>(
&self,
key: DepNode,
cx: C,
arg: A,
task: fn(_: C, _: A) -> R
) -> (R, DepNodeIndex) where
C: DepGraphSafe + StableHashingContextProvider<ContextType = HCX>,
R: HashStable<HCX>,
[src]
&self,
key: DepNode,
cx: C,
arg: A,
task: fn(_: C, _: A) -> R
) -> (R, DepNodeIndex) where
C: DepGraphSafe + StableHashingContextProvider<ContextType = HCX>,
R: HashStable<HCX>,
🔬 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?
Execute something within an "eval-always" task which is a task
pub fn read(&self, v: DepNode)
[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 read_index(&self, dep_node_index: DepNodeIndex)
[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 fingerprint_of(&self, dep_node: &DepNode) -> Fingerprint
[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 prev_fingerprint_of(&self, dep_node: &DepNode) -> Option<Fingerprint>
[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 prev_dep_node_index_of(
&self,
dep_node: &DepNode
) -> SerializedDepNodeIndex
[src]
&self,
dep_node: &DepNode
) -> SerializedDepNodeIndex
🔬 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 insert_previous_work_product(&self, v: &WorkProductId, data: WorkProduct)
[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?
Indicates that a previous work product exists for v
. This is
invoked during initial start-up based on what nodes are clean
(and what files exist in the incr. directory).
pub fn insert_work_product(&self, v: &WorkProductId, data: WorkProduct)
[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?
Indicates that we created the given work-product in this run
for v
. This record will be preserved and loaded in the next
run.
pub fn previous_work_product(&self, v: &WorkProductId) -> Option<WorkProduct>
[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?
Check whether a previous work product exists for v
and, if
so, return the path that leads to it. Used to skip doing work.
pub fn work_products(&self) -> Ref<FxHashMap<WorkProductId, WorkProduct>>
[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?
Access the map of work-products created during this run. Only used during saving of the dep-graph.
pub fn previous_work_products(
&self
) -> Ref<FxHashMap<WorkProductId, WorkProduct>>
[src]
&self
) -> Ref<FxHashMap<WorkProductId, WorkProduct>>
🔬 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?
Access the map of work-products created during the cached run. Only used during saving of the dep-graph.
pub fn register_dep_node_debug_str<F>(
&self,
dep_node: DepNode,
debug_str_gen: F
) where
F: FnOnce() -> String,
[src]
&self,
dep_node: DepNode,
debug_str_gen: F
) where
F: FnOnce() -> String,
🔬 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 edge_deduplication_data(&self) -> (u64, u64)
[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(&self) -> SerializedDepGraph
[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 node_color(&self, dep_node: &DepNode) -> Option<DepNodeColor>
[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 try_mark_green<'tcx>(
&self,
tcx: TyCtxt<'_, 'tcx, 'tcx>,
dep_node: &DepNode
) -> Option<DepNodeIndex>
[src]
&self,
tcx: TyCtxt<'_, 'tcx, 'tcx>,
dep_node: &DepNode
) -> Option<DepNodeIndex>
🔬 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 is_green(&self, dep_node_index: DepNodeIndex) -> bool
[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 exec_cache_promotions<'a, 'tcx>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>)
[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 mark_loaded_from_cache(&self, dep_node_index: DepNodeIndex, state: bool)
[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 was_loaded_from_cache(&self, dep_node: &DepNode) -> Option<bool>
[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?