about summary refs log tree commit diff
path: root/compiler/rustc_resolve/messages.ftl
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2025-08-09 23:56:00 -0700
committerJosh Triplett <josh@joshtriplett.org>2025-08-14 14:23:05 -0700
commit354fcf2b52119d938b3181bd6cbc3be1929138df (patch)
tree6ef9a562d362b3db77d85520820570bcc342c73b /compiler/rustc_resolve/messages.ftl
parent8fb98ef36846f74c8a642e856808ad5600ae4110 (diff)
downloadrust-354fcf2b52119d938b3181bd6cbc3be1929138df.tar.gz
rust-354fcf2b52119d938b3181bd6cbc3be1929138df.zip
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.
Diffstat (limited to 'compiler/rustc_resolve/messages.ftl')
-rw-r--r--compiler/rustc_resolve/messages.ftl2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/messages.ftl b/compiler/rustc_resolve/messages.ftl
index d5ff8a4b609..05b5abc3dc6 100644
--- a/compiler/rustc_resolve/messages.ftl
+++ b/compiler/rustc_resolve/messages.ftl
@@ -249,7 +249,7 @@ resolve_macro_cannot_use_as_attr =
     `{$ident}` exists, but has no `attr` rules
 
 resolve_macro_cannot_use_as_derive =
-     `{$ident}` exists, but a declarative macro cannot be used as a derive macro
+     `{$ident}` exists, but has no `derive` rules
 
 resolve_macro_defined_later =
     a macro with the same name exists, but it appears later