diff options
| author | Ralf Jung <post@ralfj.de> | 2025-03-11 07:07:31 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-11 07:07:31 +0000 |
| commit | fe5235ee0f90f41d6a10cc68e4f1adc3fed45235 (patch) | |
| tree | 8ed0a4f28637b7609ac6771ecf499f8f2445a52b /compiler/rustc_parse/src/errors.rs | |
| parent | 5533da2d9f628c161598c74901c2740689d9a2df (diff) | |
| parent | 4f2a03c011dce98a354bf1947814ea9b428d0f1b (diff) | |
| download | rust-fe5235ee0f90f41d6a10cc68e4f1adc3fed45235.tar.gz rust-fe5235ee0f90f41d6a10cc68e4f1adc3fed45235.zip | |
Merge pull request #4224 from rust-lang/rustup-2025-03-11
Automatic Rustup
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 8d2fd595942..e090d9cf760 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -106,6 +106,19 @@ pub(crate) struct IncorrectUseOfAwait { pub span: Span, } +#[derive(Diagnostic)] +#[diag(parse_incorrect_use_of_use)] +pub(crate) struct IncorrectUseOfUse { + #[primary_span] + #[suggestion( + parse_parentheses_suggestion, + style = "verbose", + code = "", + applicability = "machine-applicable" + )] + pub span: Span, +} + #[derive(Subdiagnostic)] #[multipart_suggestion( parse_incorrect_use_of_await_postfix_suggestion, @@ -1500,6 +1513,14 @@ pub(crate) struct AsyncMoveOrderIncorrect { } #[derive(Diagnostic)] +#[diag(parse_async_use_order_incorrect)] +pub(crate) struct AsyncUseOrderIncorrect { + #[primary_span] + #[suggestion(style = "verbose", code = "async use", applicability = "maybe-incorrect")] + pub span: Span, +} + +#[derive(Diagnostic)] #[diag(parse_double_colon_in_bound)] pub(crate) struct DoubleColonInBound { #[primary_span] @@ -1668,6 +1689,13 @@ pub(crate) struct AsyncMoveBlockIn2015 { } #[derive(Diagnostic)] +#[diag(parse_async_use_block_in_2015)] +pub(crate) struct AsyncUseBlockIn2015 { + #[primary_span] + pub span: Span, +} + +#[derive(Diagnostic)] #[diag(parse_async_bound_modifier_in_2015)] pub(crate) struct AsyncBoundModifierIn2015 { #[primary_span] |
