rust/tests/ui/macros/macro-rules-derive.run.stdout
Josh Triplett 354fcf2b52 mbe: Handle applying macro_rules derives
Add infrastructure to apply a derive macro to arguments, consuming and
returning a `TokenTree` only.

Handle `SyntaxExtensionKind::MacroRules` when expanding a derive, if the
macro's kinds support derive.

Add tests covering various cases of `macro_rules` derives.

Note that due to a pre-existing FIXME in `expand.rs`, derives are
re-queued and some errors get emitted twice. Duplicate diagnostic
suppression makes them not visible, but the FIXME should still get
fixed.
2025-08-14 14:23:05 -07:00

18 lines
596 B
Plaintext

MyExportedDerive: body="struct _S1;"
MyExportedDerive: body="struct _Twice1;"
MyExportedDerive: body="struct _Twice1;"
MyExportedDerive!("")
MyExportedDerive!("invoked, arguments")
MyExportedDerive: body="struct _S2;"
MyExportedDerive: body="struct _Twice2;"
MyExportedDerive: body="struct _Twice2;"
MyExportedDerive!("")
MyExportedDerive!("invoked, arguments")
MyLocalDerive: body="struct _S3;"
MyLocalDerive: body="struct _Twice3;"
MyLocalDerive: body="struct _Twice3;"
MyLocalDerive!("")
MyLocalDerive!("invoked, arguments")
MyGlobalType::name(): MyGlobalType
MyLocalType::name(): MyLocalType