Struct rustc_resolve::ResolverTree
source · pub(crate) struct ResolverTree<'a, 'b>(pub(crate) &'a Definitions, pub(crate) &'a CrateLoader<'b>);Expand description
A minimal subset of resolver that can implemenent DefIdTree, sometimes
required to satisfy borrow checker by avoiding borrowing the whole resolver.
Tuple Fields
0: &'a Definitions1: &'a CrateLoader<'b>Trait Implementations
sourceimpl<'a, 'b> Clone for ResolverTree<'a, 'b>
impl<'a, 'b> Clone for ResolverTree<'a, 'b>
sourcefn clone(&self) -> ResolverTree<'a, 'b>
fn clone(&self) -> ResolverTree<'a, 'b>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl DefIdTree for ResolverTree<'_, '_>
impl DefIdTree for ResolverTree<'_, '_>
fn opt_parent(self, id: DefId) -> Option<DefId>
fn parent(self, id: DefId) -> DefId
fn opt_local_parent(self, id: LocalDefId) -> Option<LocalDefId>
fn local_parent(self, id: LocalDefId) -> LocalDefId
fn is_descendant_of(self, descendant: DefId, ancestor: DefId) -> bool
impl<'a, 'b> Copy for ResolverTree<'a, 'b>
Auto Trait Implementations
impl<'a, 'b> !RefUnwindSafe for ResolverTree<'a, 'b>
impl<'a, 'b> !Send for ResolverTree<'a, 'b>
impl<'a, 'b> !Sync for ResolverTree<'a, 'b>
impl<'a, 'b> Unpin for ResolverTree<'a, 'b>where
'b: 'a,
impl<'a, 'b> !UnwindSafe for ResolverTree<'a, 'b>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes