diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-02-02 17:14:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-02 17:14:05 +0100 |
| commit | 8f47954742364b452716daff72bba976e18288e5 (patch) | |
| tree | 7e63fbd9a88c6bb7a6322f783a1afe2f711b7932 /compiler/rustc_parse/src/errors.rs | |
| parent | 97872b792c9dd6a9bc5c3f4e62a0bd5958b09cdc (diff) | |
| parent | 9dd5d3e8e421193be34fa822ab485de115174421 (diff) | |
| download | rust-8f47954742364b452716daff72bba976e18288e5.tar.gz rust-8f47954742364b452716daff72bba976e18288e5.zip | |
Rollup merge of #106919 - compiler-errors:underscore-typo-in-field-pat, r=jackh726
Recover `_` as `..` in field pattern
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 145611923ff..20da8ce5b6e 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -1,3 +1,5 @@ +use std::borrow::Cow; + use rustc_ast::token::Token; use rustc_ast::{Path, Visibility}; use rustc_errors::{fluent, AddToDiagnostic, Applicability, EmissionGuarantee, IntoDiagnostic}; @@ -1802,8 +1804,9 @@ pub(crate) struct EnumPatternInsteadOfIdentifier { #[diag(parse_dot_dot_dot_for_remaining_fields)] pub(crate) struct DotDotDotForRemainingFields { #[primary_span] - #[suggestion(code = "..", applicability = "machine-applicable")] + #[suggestion(code = "..", style = "verbose", applicability = "machine-applicable")] pub span: Span, + pub token_str: Cow<'static, str>, } #[derive(Diagnostic)] |
