pub enum AttrArg {
Ident(Symbol),
Expr(ExprId),
}Expand description
One argument of an attribute.
Most attribute arguments are expressions, but a few take a bare identifier that must not be
looked up as one: the printf in format(printf, 1, 2) names an archetype and the DI in
mode(DI) names a machine mode, and neither is a variable. Treating them as expressions is
how a compiler ends up reporting an undeclared identifier inside an attribute.
Variants§
Trait Implementations§
impl Copy for AttrArg
impl Eq for AttrArg
impl StructuralPartialEq for AttrArg
Auto Trait Implementations§
impl Freeze for AttrArg
impl RefUnwindSafe for AttrArg
impl Send for AttrArg
impl Sync for AttrArg
impl Unpin for AttrArg
impl UnsafeUnpin for AttrArg
impl UnwindSafe for AttrArg
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