diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2024-11-12 14:13:58 +0000 | 
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2024-11-22 16:49:10 +0000 | 
| commit | 4627db2a107891da1999af06729e3422af773b56 (patch) | |
| tree | a2fa5c225abbaf39430c4c54d2e9409782cd0199 /compiler/rustc_resolve/src/errors.rs | |
| parent | 8522140caafdec5c63308bbe9aa9f5ce5e6b1863 (diff) | |
| download | rust-4627db2a107891da1999af06729e3422af773b56.tar.gz rust-4627db2a107891da1999af06729e3422af773b56.zip | |
Diagnostic for using macro_rules macro as attr/derive
Diffstat (limited to 'compiler/rustc_resolve/src/errors.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/errors.rs | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/compiler/rustc_resolve/src/errors.rs b/compiler/rustc_resolve/src/errors.rs index f605b7096f0..24f5a812a82 100644 --- a/compiler/rustc_resolve/src/errors.rs +++ b/compiler/rustc_resolve/src/errors.rs @@ -666,6 +666,22 @@ pub(crate) struct MacroSuggMovePosition { } #[derive(Subdiagnostic)] +pub(crate) enum MacroRulesNot { + #[label(resolve_macro_cannot_use_as_attr)] + Attr { + #[primary_span] + span: Span, + ident: Ident, + }, + #[label(resolve_macro_cannot_use_as_derive)] + Derive { + #[primary_span] + span: Span, + ident: Ident, + }, +} + +#[derive(Subdiagnostic)] #[note(resolve_missing_macro_rules_name)] pub(crate) struct MaybeMissingMacroRulesName { #[primary_span] | 
