summary refs log tree commit diff
path: root/compiler/rustc_expand/src/errors.rs
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-06-21 03:46:54 -0400
committerTrevor Gross <tmgross@umich.edu>2025-06-30 19:02:36 +0000
commit128945fdbf737cba3eaa33ae8663c6dd3f45e363 (patch)
treea5ce426a436e438d46ece2cf9e580db1a06924e8 /compiler/rustc_expand/src/errors.rs
parentb3d74da9b8edb47b9b785afb7ac9f1a9a1841835 (diff)
downloadrust-128945fdbf737cba3eaa33ae8663c6dd3f45e363.tar.gz
rust-128945fdbf737cba3eaa33ae8663c6dd3f45e363.zip
mbe: Shorten `MetaVarExpr` -> `Mve` in structural diagnostics
More diagnostic structs related to metavariable expressions will be
introduced. Introduce the abbreviation "mve" which is reasonably
unambiguous (`rg Mve` and `rg '(\b|_|-)mve(\b|_|-)'` return no results
outside of a Thumb target feature) and use it for these diagnostic
types. A new module is also created.
Diffstat (limited to 'compiler/rustc_expand/src/errors.rs')
-rw-r--r--compiler/rustc_expand/src/errors.rs21
1 files changed, 13 insertions, 8 deletions
diff --git a/compiler/rustc_expand/src/errors.rs b/compiler/rustc_expand/src/errors.rs
index 714ba3bf0f4..0d77916d4cf 100644
--- a/compiler/rustc_expand/src/errors.rs
+++ b/compiler/rustc_expand/src/errors.rs
@@ -28,14 +28,6 @@ pub(crate) struct CountRepetitionMisplaced {
 }
 
 #[derive(Diagnostic)]
-#[diag(expand_meta_var_expr_unrecognized_var)]
-pub(crate) struct MetaVarExprUnrecognizedVar {
-    #[primary_span]
-    pub span: Span,
-    pub key: MacroRulesNormalizedIdent,
-}
-
-#[derive(Diagnostic)]
 #[diag(expand_var_still_repeating)]
 pub(crate) struct VarStillRepeating {
     #[primary_span]
@@ -500,3 +492,16 @@ pub(crate) struct ProcMacroBackCompat {
     pub crate_name: String,
     pub fixed_version: String,
 }
+
+pub(crate) use metavar_exprs::*;
+mod metavar_exprs {
+    use super::*;
+
+    #[derive(Diagnostic)]
+    #[diag(expand_mve_unrecognized_var)]
+    pub(crate) struct MveUnrecognizedVar {
+        #[primary_span]
+        pub span: Span,
+        pub key: MacroRulesNormalizedIdent,
+    }
+}