Enum rustc_resolve::ModuleKind[][src]

enum ModuleKind {
    Block(NodeId),
    Def(DefName),
}
🔬 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?

Variants

🔬 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?

An anonymous module, eg. just a block.

fn main() {
    fn f() {} // (1)
    { // This is an anonymous module
        f(); // This resolves to (2) as we are inside the block.
        fn f() {} // (2)
    }
    f(); // Resolves to (1)
}
🔬 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?

Any module with a name.

This could be:

Auto Trait Implementations

impl !Send for ModuleKind

impl !Sync for ModuleKind