Struct rustc::ty::inhabitedness::DefIdForest
[−]
[src]
pub struct DefIdForest { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (
rustc_private
)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]
fn empty() -> DefIdForest
🔬 This is a nightly-only experimental API. (
rustc_private
)Create an empty forest.
fn full(tcx: TyCtxt<'a, 'gcx, 'tcx>) -> DefIdForest
🔬 This is a nightly-only experimental API. (
rustc_private
)Create a forest consisting of a single tree representing the entire crate.
fn from_id(id: DefId) -> DefIdForest
🔬 This is a nightly-only experimental API. (
rustc_private
)Create a forest containing a DefId and all its descendants.
fn is_empty(&self) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)Test whether the forest is empty.
fn contains(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>, id: DefId) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)Test whether the forest conains a given DefId.
fn intersection<I>(tcx: TyCtxt<'a, 'gcx, 'tcx>, iter: I) -> DefIdForest where I: IntoIterator<Item=DefIdForest>
🔬 This is a nightly-only experimental API. (
rustc_private
)Calculate the intersection of a collection of forests.
fn union<I>(tcx: TyCtxt<'a, 'gcx, 'tcx>, iter: I) -> DefIdForest where I: IntoIterator<Item=DefIdForest>
🔬 This is a nightly-only experimental API. (
rustc_private
)Calculate the union of a collection of forests.
Trait Implementations
impl Clone for DefIdForest
[src]
fn clone(&self) -> DefIdForest
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more