Struct rustc_resolve::ParentScope [−][src]
pub struct ParentScope<'a> {
module: &'a ModuleData<'a>,
expansion: ExpnId,
macro_rules: PtrKey<'a, Cell<MacroRulesScope<'a>>>,
derives: &'a [Path],
}Expand description
Everything you need to know about a name’s location to resolve it. Serves as a starting point for the scope visitor. This struct is currently used only for early resolution (imports and macros), but not for late resolution yet.
Fields
module: &'a ModuleData<'a>expansion: ExpnIdmacro_rules: PtrKey<'a, Cell<MacroRulesScope<'a>>>derives: &'a [Path]Implementations
impl<'a> ParentScope<'a>[src]
impl<'a> ParentScope<'a>[src]pub fn module(
module: &'a ModuleData<'a>,
resolver: &Resolver<'a>
) -> ParentScope<'a>[src]
pub fn module(
module: &'a ModuleData<'a>,
resolver: &Resolver<'a>
) -> ParentScope<'a>[src]Creates a parent scope with the passed argument used as the module scope component, and other scope components set to default empty values.
Trait Implementations
impl<'a> Clone for ParentScope<'a>[src]
impl<'a> Clone for ParentScope<'a>[src]fn clone(&self) -> ParentScope<'a>[src]
fn clone(&self) -> ParentScope<'a>[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl<'a> Debug for ParentScope<'a>[src]
impl<'a> Debug for ParentScope<'a>[src]impl<'a> Copy for ParentScope<'a>[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ParentScope<'a>
impl<'a> !Send for ParentScope<'a>
impl<'a> !Sync for ParentScope<'a>
impl<'a> Unpin for ParentScope<'a>
impl<'a> !UnwindSafe for ParentScope<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more