Struct rustc::ty::inhabitedness::DefIdForest
[−]
[src]
pub struct DefIdForest { /* 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?
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.
Methods
impl<'a, 'gcx, 'tcx> DefIdForest[src]
pub fn empty() -> 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.
pub fn full(tcx: TyCtxt<'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 a forest consisting of a single tree representing the entire crate.
pub fn from_id(id: DefId) -> 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 a forest containing a DefId and all its descendants.
pub fn is_empty(&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?
Test whether the forest is empty.
pub fn contains(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>, id: DefId) -> 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?
Test whether the forest contains a given DefId.
pub fn intersection<I>(tcx: TyCtxt<'a, 'gcx, 'tcx>, iter: I) -> DefIdForest where
I: IntoIterator<Item = DefIdForest>, [src]
I: IntoIterator<Item = DefIdForest>,
🔬 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.
pub fn union<I>(tcx: TyCtxt<'a, 'gcx, 'tcx>, iter: I) -> DefIdForest where
I: IntoIterator<Item = DefIdForest>, [src]
I: IntoIterator<Item = DefIdForest>,
🔬 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]
fn clone(&self) -> DefIdForest[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more