Trait rustc::dep_graph::DepGraphSafe [] [src]

pub trait DepGraphSafe { }
🔬 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 via Cargo.toml instead?

The DepGraphSafe trait is used to specify what kinds of values are safe to "leak" into a task. The idea is that this should be only be implemented for things like the tcx as well as various id types, which will create reads in the dep-graph whenever the trait loads anything that might depend on the input program.

Implementations on Foreign Types

impl DepGraphSafe for NodeId

A NodeId on its own doesn't give access to any particular state. You must fetch the state from the various maps or generate on-demand queries, all of which create reads.

impl<A, B> DepGraphSafe for (A, B) where
    A: DepGraphSafe,
    B: DepGraphSafe

Tuples make it easy to build up state.

impl<'a, A> DepGraphSafe for &'a A where
    A: DepGraphSafe

Shared ref to dep-graph-safe stuff should still be dep-graph-safe.

impl<'a, A> DepGraphSafe for &'a mut A where
    A: DepGraphSafe

Mut ref to dep-graph-safe stuff should still be dep-graph-safe.

impl DepGraphSafe for ()

No data here! :)