2022-09-18 11:46:56 -04:00
|
|
|
use rustc_macros::Diagnostic;
|
2022-08-17 11:20:37 -03:00
|
|
|
use rustc_span::symbol::MacroRulesNormalizedIdent;
|
2022-08-17 11:18:19 -03:00
|
|
|
use rustc_span::Span;
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic)]
|
2022-08-19 15:40:48 +02:00
|
|
|
#[diag(expand::expr_repeat_no_syntax_vars)]
|
2022-08-17 11:18:19 -03:00
|
|
|
pub(crate) struct NoSyntaxVarsExprRepeat {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic)]
|
2022-08-19 15:40:48 +02:00
|
|
|
#[diag(expand::must_repeat_once)]
|
2022-08-17 11:18:19 -03:00
|
|
|
pub(crate) struct MustRepeatOnce {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic)]
|
2022-08-19 15:40:48 +02:00
|
|
|
#[diag(expand::count_repetition_misplaced)]
|
2022-08-17 11:18:19 -03:00
|
|
|
pub(crate) struct CountRepetitionMisplaced {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic)]
|
2022-08-19 15:40:48 +02:00
|
|
|
#[diag(expand::meta_var_expr_unrecognized_var)]
|
2022-08-17 11:18:19 -03:00
|
|
|
pub(crate) struct MetaVarExprUnrecognizedVar {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
pub key: MacroRulesNormalizedIdent,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic)]
|
2022-08-19 15:40:48 +02:00
|
|
|
#[diag(expand::var_still_repeating)]
|
2022-08-17 11:18:19 -03:00
|
|
|
pub(crate) struct VarStillRepeating {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
pub ident: MacroRulesNormalizedIdent,
|
|
|
|
}
|
|
|
|
|
2022-09-18 11:46:56 -04:00
|
|
|
#[derive(Diagnostic)]
|
2022-08-19 15:40:48 +02:00
|
|
|
#[diag(expand::meta_var_dif_seq_matchers)]
|
2022-08-17 11:18:19 -03:00
|
|
|
pub(crate) struct MetaVarsDifSeqMatchers {
|
|
|
|
#[primary_span]
|
|
|
|
pub span: Span,
|
|
|
|
pub msg: String,
|
|
|
|
}
|