Struct rustc::ty::inhabitedness::def_id_forest::DefIdForest[][src]

pub struct DefIdForest {
    root_ids: SmallVec<[DefId; 1]>,
}
🔬 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?

Represents a forest of DefIds closed under the ancestor relation. That is, if a DefId representing a module is contained in the forest then all DefIds defined in that module or submodules are also implicitly contained in the forest.

This is used to represent a set of modules in which a type is visibly uninhabited.

Fields

🔬 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?

The minimal set of DefIds required to represent the whole set. If A and B are DefIds in the DefIdForest, and A is a descendant of B, then only B will be in root_ids. We use a SmallVec here because (for its use for caching inhabitedness) its rare that this will contain even two ids.

Methods

impl<'a, 'gcx, 'tcx> DefIdForest
[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?

Create an empty forest.

🔬 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 forest consisting of a single tree representing the entire crate.

🔬 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 forest containing a DefId and all its descendants.

🔬 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?

Test whether the forest is empty.

🔬 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?

Test whether the forest contains a given DefId.

🔬 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?

Calculate the intersection of a collection of forests.

🔬 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?

Calculate the union of a collection of forests.

Trait Implementations

impl Clone for DefIdForest
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for DefIdForest

impl Sync for DefIdForest