summary refs log tree commit diff
path: root/compiler/rustc_expand/src/errors.rs
diff options
context:
space:
mode:
authornidnogg <henriquevt98@gmail.com>2022-08-17 11:18:19 -0300
committernidnogg <henriquevt98@gmail.com>2022-08-17 11:18:19 -0300
commitc6f9a9c410e063f59bc2f6958674099b3fe5f184 (patch)
tree5952411a6f83af897bde1581f89307aed87e29e7 /compiler/rustc_expand/src/errors.rs
parent72ce216def236055f5bee03d06085d0ec9c270a9 (diff)
downloadrust-c6f9a9c410e063f59bc2f6958674099b3fe5f184.tar.gz
rust-c6f9a9c410e063f59bc2f6958674099b3fe5f184.zip
Moved structs to rustc_expand::errors, added several more migrations, fixed slug name
Diffstat (limited to 'compiler/rustc_expand/src/errors.rs')
-rw-r--r--compiler/rustc_expand/src/errors.rs50
1 files changed, 50 insertions, 0 deletions
diff --git a/compiler/rustc_expand/src/errors.rs b/compiler/rustc_expand/src/errors.rs
new file mode 100644
index 00000000000..f8b8750a789
--- /dev/null
+++ b/compiler/rustc_expand/src/errors.rs
@@ -0,0 +1,50 @@
+use rustc_macros::SessionDiagnostic;
+use rustc_span::Span;
+use rustc_span::symbol::{MacroRulesNormalizedIdent};
+
+#[derive(SessionDiagnostic)]
+#[error(expand::expr_repeat_no_syntax_vars)]
+pub(crate) struct NoSyntaxVarsExprRepeat {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(SessionDiagnostic)]
+#[error(expand::must_repeat_once)]
+pub(crate) struct MustRepeatOnce {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(SessionDiagnostic)]
+#[error(expand::count_repetition_misplaced)]
+pub(crate) struct CountRepetitionMisplaced {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(SessionDiagnostic)]
+#[error(expand::meta_var_expr_unrecognized_var)]
+pub(crate) struct MetaVarExprUnrecognizedVar {
+    #[primary_span]
+    pub span: Span,
+    pub key: MacroRulesNormalizedIdent,
+}
+
+#[derive(SessionDiagnostic)]
+#[error(expand::var_still_repeating)]
+pub(crate) struct VarStillRepeating {
+    #[primary_span]
+    pub span: Span,
+    pub ident: MacroRulesNormalizedIdent,
+}
+
+#[derive(SessionDiagnostic)]
+#[error(expand::var_still_repeating)]
+pub(crate) struct MetaVarsDifSeqMatchers {
+    #[primary_span]
+    pub span: Span,
+    pub msg: String,
+}
+
+