[−][src]Struct rustc_resolve::ModuleData
One node in the tree of modules.
Fields
parent: Option<&'a ModuleData<'a>>kind: ModuleKindnormal_ancestor_id: DefIdlazy_resolutions: RefCell<FxIndexMap<BindingKey, &'a RefCell<NameResolution<'a>>>>populate_on_access: Cell<bool>unexpanded_invocations: RefCell<FxHashSet<ExpnId>>no_implicit_prelude: boolglob_importers: RefCell<Vec<&'a Import<'a>>>globs: RefCell<Vec<&'a Import<'a>>>traits: RefCell<Option<Box<[(Ident, &'a NameBinding<'a>)]>>>span: SpanSpan of the module itself. Used for error reporting.
expansion: ExpnIdImplementations
impl<'a> ModuleData<'a>[src]
pub(crate) fn new(
parent: Option<&'a ModuleData<'a>>,
kind: ModuleKind,
normal_ancestor_id: DefId,
expansion: ExpnId,
span: Span
) -> Self[src]
parent: Option<&'a ModuleData<'a>>,
kind: ModuleKind,
normal_ancestor_id: DefId,
expansion: ExpnId,
span: Span
) -> Self
pub(crate) fn for_each_child<R, F>(&'a self, resolver: &mut R, f: F) where
R: AsMut<Resolver<'a>>,
F: FnMut(&mut R, Ident, Namespace, &'a NameBinding<'a>), [src]
R: AsMut<Resolver<'a>>,
F: FnMut(&mut R, Ident, Namespace, &'a NameBinding<'a>),
pub(crate) fn ensure_traits<R>(&'a self, resolver: &mut R) where
R: AsMut<Resolver<'a>>, [src]
R: AsMut<Resolver<'a>>,
This modifies self in place. The traits will be stored in self.traits.
pub(crate) fn res(&self) -> Option<Res<NodeId>>[src]
pub(crate) fn def_id(&self) -> Option<DefId>[src]
pub(crate) fn is_normal(&self) -> bool[src]
pub(crate) fn is_trait(&self) -> bool[src]
pub(crate) fn nearest_item_scope(&'a self) -> &'a ModuleData<'a>[src]
pub(crate) fn is_ancestor_of(&self, other: &Self) -> bool[src]
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ModuleData<'a>
impl<'a> !Send for ModuleData<'a>
impl<'a> !Sync for ModuleData<'a>
impl<'a> Unpin for ModuleData<'a>
impl<'a> !UnwindSafe for ModuleData<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,