Enum rustc_ast::ast::MacArgs [−][src]
pub enum MacArgs {
Empty,
Delimited(DelimSpan, MacDelimiter, TokenStream),
Eq(Span, Token),
}
Expand description
Arguments passed to an attribute or a function-like macro.
Variants
No arguments - #[attr]
.
Delimited(DelimSpan, MacDelimiter, TokenStream)
Delimited arguments - #[attr()/[]/{}]
or mac!()/[]/{}
.
Tuple Fields of Delimited
Arguments of a key-value attribute - #[attr = "value"]
.
Implementations
Tokens inside the delimiters or after =
.
Proc macros see these tokens, for example.
Whether a macro with these arguments needs a semicolon when used as a standalone item or statement.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for MacArgs
impl !UnwindSafe for MacArgs
Blanket Implementations
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: 40 bytes
Size for each variant:
Empty
: 0 bytesDelimited
: 31 bytesEq
: 39 bytes