diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2024-10-08 14:25:39 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2024-10-08 14:25:39 +0300 |
| commit | 4316afffd9390bdac1d3bd5e5398c65d6e9bb150 (patch) | |
| tree | 9d5b39941405bec4b7c4571606df8b88850325e9 /compiler/rustc_parse/src/errors.rs | |
| parent | 537fb8d1bb2405b118898c663bc076815a1762c7 (diff) | |
| parent | cf24c73141a77db730f4b7fda69dcd7e8b113b51 (diff) | |
| download | rust-4316afffd9390bdac1d3bd5e5398c65d6e9bb150.tar.gz rust-4316afffd9390bdac1d3bd5e5398c65d6e9bb150.zip | |
Merge from rust-lang/rust
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 20bcefd4fe1..dade3912751 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -2572,6 +2572,25 @@ pub(crate) struct EnumPatternInsteadOfIdentifier { } #[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 { #[primary_span] @@ -2589,6 +2608,7 @@ pub(crate) struct ExpectedCommaAfterPatternField { #[derive(Diagnostic)] #[diag(parse_unexpected_expr_in_pat)] +#[note] pub(crate) struct UnexpectedExpressionInPattern { /// The unexpected expr's span. #[primary_span] |
