]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_expand/src/errors.rs
Rollup merge of #104394 - oli-obk:suggest_method_call, r=lcnr
[rust.git] / compiler / rustc_expand / src / errors.rs
1 use rustc_macros::Diagnostic;
2 use rustc_span::symbol::MacroRulesNormalizedIdent;
3 use rustc_span::Span;
4
5 #[derive(Diagnostic)]
6 #[diag(expand_expr_repeat_no_syntax_vars)]
7 pub(crate) struct NoSyntaxVarsExprRepeat {
8     #[primary_span]
9     pub span: Span,
10 }
11
12 #[derive(Diagnostic)]
13 #[diag(expand_must_repeat_once)]
14 pub(crate) struct MustRepeatOnce {
15     #[primary_span]
16     pub span: Span,
17 }
18
19 #[derive(Diagnostic)]
20 #[diag(expand_count_repetition_misplaced)]
21 pub(crate) struct CountRepetitionMisplaced {
22     #[primary_span]
23     pub span: Span,
24 }
25
26 #[derive(Diagnostic)]
27 #[diag(expand_meta_var_expr_unrecognized_var)]
28 pub(crate) struct MetaVarExprUnrecognizedVar {
29     #[primary_span]
30     pub span: Span,
31     pub key: MacroRulesNormalizedIdent,
32 }
33
34 #[derive(Diagnostic)]
35 #[diag(expand_var_still_repeating)]
36 pub(crate) struct VarStillRepeating {
37     #[primary_span]
38     pub span: Span,
39     pub ident: MacroRulesNormalizedIdent,
40 }
41
42 #[derive(Diagnostic)]
43 #[diag(expand_meta_var_dif_seq_matchers)]
44 pub(crate) struct MetaVarsDifSeqMatchers {
45     #[primary_span]
46     pub span: Span,
47     pub msg: String,
48 }