Enum rustc_resolve::ModuleKind
source · pub(crate) enum ModuleKind {
Block,
Def(DefKind, DefId, Symbol),
}
Variants§
Block
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§
Trait Implementations§
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
Size for each variant:
Block
: 0 bytesDef
: 15 bytes