Struct rustc_resolve::ModuleData [−][src]
pub struct ModuleData<'a> {
parent: Option<&'a ModuleData<'a>>,
kind: ModuleKind,
normal_ancestor_id: DefId,
resolutions: RefCell<FxHashMap<(Ident, Namespace), &'a RefCell<NameResolution<'a>>>>,
legacy_macro_resolutions: RefCell<Vec<(Mark, Ident, MacroKind, Option<Def>)>>,
macro_resolutions: RefCell<Vec<(Box<[Ident]>, Span)>>,
unresolved_invocations: RefCell<FxHashSet<Mark>>,
no_implicit_prelude: bool,
glob_importers: RefCell<Vec<&'a ImportDirective<'a>>>,
globs: RefCell<Vec<&'a ImportDirective<'a>>>,
traits: RefCell<Option<Box<[(Ident, &'a NameBinding<'a>)]>>>,
populated: Cell<bool>,
span: Span,
expansion: Mark,
}🔬 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?
One node in the tree of modules.
Fields
parent: Option<&'a ModuleData<'a>>
🔬 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?
kind: ModuleKind
🔬 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?
normal_ancestor_id: DefId
🔬 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?
resolutions: RefCell<FxHashMap<(Ident, Namespace), &'a RefCell<NameResolution<'a>>>>
🔬 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?
legacy_macro_resolutions: RefCell<Vec<(Mark, Ident, MacroKind, Option<Def>)>>
🔬 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?
macro_resolutions: RefCell<Vec<(Box<[Ident]>, Span)>>
🔬 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?
unresolved_invocations: RefCell<FxHashSet<Mark>>
🔬 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?
no_implicit_prelude: bool
🔬 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?
glob_importers: RefCell<Vec<&'a ImportDirective<'a>>>
🔬 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?
globs: RefCell<Vec<&'a ImportDirective<'a>>>
🔬 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?
traits: RefCell<Option<Box<[(Ident, &'a NameBinding<'a>)]>>>
🔬 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?
populated: Cell<bool>
🔬 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?
span: Span
🔬 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?
Span of the module itself. Used for error reporting.
expansion: Mark
🔬 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?
Methods
impl<'a> ModuleData<'a>[src]
impl<'a> ModuleData<'a>fn new(
parent: Option<&'a ModuleData<'a>>,
kind: ModuleKind,
normal_ancestor_id: DefId,
expansion: Mark,
span: Span
) -> Self[src]
fn new(
parent: Option<&'a ModuleData<'a>>,
kind: ModuleKind,
normal_ancestor_id: DefId,
expansion: Mark,
span: Span
) -> Self🔬 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?
fn for_each_child<F: FnMut(Ident, Namespace, &'a NameBinding<'a>)>(&self, f: F)[src]
fn for_each_child<F: FnMut(Ident, Namespace, &'a NameBinding<'a>)>(&self, f: F)🔬 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?
fn for_each_child_stable<F: FnMut(Ident, Namespace, &'a NameBinding<'a>)>(
&self,
f: F
)[src]
fn for_each_child_stable<F: FnMut(Ident, Namespace, &'a NameBinding<'a>)>(
&self,
f: F
)🔬 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?
fn def(&self) -> Option<Def>[src]
fn def(&self) -> Option<Def>🔬 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?
fn def_id(&self) -> Option<DefId>[src]
fn def_id(&self) -> Option<DefId>🔬 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?
fn is_normal(&self) -> bool[src]
fn is_normal(&self) -> bool🔬 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?
fn is_trait(&self) -> bool[src]
fn is_trait(&self) -> bool🔬 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?
fn is_local(&self) -> bool[src]
fn is_local(&self) -> bool🔬 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?
fn nearest_item_scope(&'a self) -> &'a ModuleData<'a>[src]
fn nearest_item_scope(&'a self) -> &'a ModuleData<'a>🔬 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?
Trait Implementations
impl<'a> Debug for ModuleData<'a>[src]
impl<'a> Debug for ModuleData<'a>Auto Trait Implementations
impl<'a> !Send for ModuleData<'a>
impl<'a> !Send for ModuleData<'a>impl<'a> !Sync for ModuleData<'a>
impl<'a> !Sync for ModuleData<'a>