Enum rustc_resolve::ModuleKind[−][src]

pub(crate) enum ModuleKind {
    Block(NodeId),
    Def(DefKind, DefId, Symbol),
}

Variants

Block(NodeId)

An anonymous module; e.g., 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)
}
Def(DefKind, DefId, Symbol)

Any module with a name.

This could be:

Implementations

impl ModuleKind[src]

pub fn name(&self) -> Option<Symbol>[src]

Get name of the module.

Trait Implementations

impl Debug for ModuleKind[src]

Auto Trait Implementations

impl RefUnwindSafe for ModuleKind

impl Send for ModuleKind

impl Sync for ModuleKind

impl Unpin for ModuleKind

impl UnwindSafe for ModuleKind

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.