diff options
| author | bors <bors@rust-lang.org> | 2024-04-24 06:37:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-24 06:37:41 +0000 |
| commit | a3fddf2384f9dc0d67252a2ec3481c8e27121aa3 (patch) | |
| tree | 24d179c88d79c08cb94c57cca50cdfaa7579c1a3 /compiler/rustc_parse/src/errors.rs | |
| parent | 26faaa30475a1be4cc26e13882e8d943df91f3d1 (diff) | |
| parent | 7e968351aa7abb766f56640f7dd9460749ef6f2b (diff) | |
| download | rust-a3fddf2384f9dc0d67252a2ec3481c8e27121aa3.tar.gz rust-a3fddf2384f9dc0d67252a2ec3481c8e27121aa3.zip | |
Auto merge of #3506 - rust-lang:rustup-2024-04-24, r=RalfJung
Automatic Rustup
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, +} |
