pub enum ExpandedSlotDecl {
Param(ParamDecl, Span),
Node(NodeDecl, Span),
ConstNode(ConstNodeDecl, Span),
}Expand description
A declaration produced by multi-decl expansion.
Expansion can only yield the three slot kinds, so this enum makes the
“never Sugar” invariant a type instead of a convention the desugar
pass had to re-assert with a panic.
Variants§
Implementations§
Source§impl ExpandedSlotDecl
impl ExpandedSlotDecl
Sourcepub fn into_declaration(self) -> Declaration
pub fn into_declaration(self) -> Declaration
Re-wrap as a generic Declaration (used by tests that inspect the
expansion through the ordinary AST surface).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExpandedSlotDecl
impl RefUnwindSafe for ExpandedSlotDecl
impl Send for ExpandedSlotDecl
impl Sync for ExpandedSlotDecl
impl Unpin for ExpandedSlotDecl
impl UnsafeUnpin for ExpandedSlotDecl
impl UnwindSafe for ExpandedSlotDecl
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