diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-24 05:04:52 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-24 05:04:52 +0000 |
| commit | 7e968351aa7abb766f56640f7dd9460749ef6f2b (patch) | |
| tree | 24d179c88d79c08cb94c57cca50cdfaa7579c1a3 /compiler/rustc_parse/src/errors.rs | |
| parent | b3affd3e90d44833ca43e8d14c0af54bcd862283 (diff) | |
| parent | 65d7c1d2d621c607174f429d5f7553210315dbae (diff) | |
| download | rust-7e968351aa7abb766f56640f7dd9460749ef6f2b.tar.gz rust-7e968351aa7abb766f56640f7dd9460749ef6f2b.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index eae2d904c35..d06f03a7c17 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -496,6 +496,15 @@ pub(crate) struct OuterAttributeNotAllowedOnIfElse { } #[derive(Diagnostic)] +#[diag(parse_outer_attr_ambiguous)] +pub(crate) struct AmbiguousOuterAttributes { + #[primary_span] + pub span: Span, + #[subdiagnostic] + pub sugg: WrapInParentheses, +} + +#[derive(Diagnostic)] #[diag(parse_missing_in_in_for_loop)] pub(crate) struct MissingInInForLoop { #[primary_span] @@ -1463,7 +1472,7 @@ impl Subdiagnostic for FnTraitMissingParen { fn add_to_diag_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>( self, diag: &mut Diag<'_, G>, - _: F, + _: &F, ) { diag.span_label(self.span, crate::fluent_generated::parse_fn_trait_missing_paren); let applicability = if self.machine_applicable { @@ -2988,3 +2997,12 @@ pub(crate) struct AsyncImpl { #[primary_span] pub span: Span, } + +#[derive(Diagnostic)] +#[diag(parse_expr_rarrow_call)] +#[help] +pub(crate) struct ExprRArrowCall { + #[primary_span] + #[suggestion(style = "short", applicability = "machine-applicable", code = ".")] + pub span: Span, +} |
