Rollup merge of #130725 - GrigorenkoPV:@-in-struct-patterns, r=Nadrieril
Parser: better error messages for `@` in struct patterns
This commit is contained in:
commit
b7c33e2f20
5 changed files with 150 additions and 13 deletions
|
@ -2571,6 +2571,25 @@ pub(crate) struct EnumPatternInsteadOfIdentifier {
|
|||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_at_dot_dot_in_struct_pattern)]
|
||||
pub(crate) struct AtDotDotInStructPattern {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
#[suggestion(code = "", style = "verbose", applicability = "machine-applicable")]
|
||||
pub remove: Span,
|
||||
pub ident: Ident,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_at_in_struct_pattern)]
|
||||
#[note]
|
||||
#[help]
|
||||
pub(crate) struct AtInStructPattern {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_dot_dot_dot_for_remaining_fields)]
|
||||
pub(crate) struct DotDotDotForRemainingFields {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue