diff options
| author | Xiretza <xiretza@xiretza.xyz> | 2022-12-13 18:57:41 +0100 |
|---|---|---|
| committer | Xiretza <xiretza@xiretza.xyz> | 2023-02-01 21:56:28 +0100 |
| commit | a476683c8478f548adee406e036328412a0f9d19 (patch) | |
| tree | 37814f5d117bad0464ff70b29196545cd53b4da7 /compiler/rustc_parse/src/errors.rs | |
| parent | 7631b12e3e820f00780fff345019436d36158159 (diff) | |
| download | rust-a476683c8478f548adee406e036328412a0f9d19.tar.gz rust-a476683c8478f548adee406e036328412a0f9d19.zip | |
rustc_parse: revert conversion of "non-item in item list" diagnostic
#[derive(Subdiagnostic)] does not allow multiple subdiagnostics on one variant, as in NonItemInItemListSub::Other.
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 1abd7577d92..5a7e28ce523 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -1447,38 +1447,6 @@ pub(crate) struct ExpectedTraitInTraitImplFoundType { } #[derive(Diagnostic)] -#[diag(parse_non_item_in_item_list)] -pub(crate) struct NonItemInItemList { - #[primary_span] - pub span: Span, - #[subdiagnostic] - pub sub: NonItemInItemListSub, - #[suggestion(suggestion_remove_semicolon, code = "", applicability = "maybe-incorrect")] - pub remove_semicolon: Option<Span>, -} - -#[derive(Subdiagnostic)] -pub(crate) enum NonItemInItemListSub { - #[suggestion( - suggestion_use_const_not_let, - code = "const", - applicability = "machine-applicable" - )] - Let { - #[primary_span] - span: Span, - }, - Other { - #[label(label_list_start)] - list_start: Span, - #[label(label_non_item)] - non_item: Span, - #[label(label_list_end)] - list_end: Span, - }, -} - -#[derive(Diagnostic)] #[diag(parse_bounds_not_allowed_on_trait_aliases)] pub(crate) struct BoundsNotAllowedOnTraitAliases { #[primary_span] |
