diff options
| author | bors <bors@rust-lang.org> | 2024-10-14 15:11:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-14 15:11:07 +0000 |
| commit | bd8f2afc449999aa6310cc9f42029d9bfdd5e910 (patch) | |
| tree | 6eebb25d13a6ace45d712257d931527662949fdc /compiler/rustc_parse/src/errors.rs | |
| parent | 15f0242c74c91cce4a8fd8b17ccfbaf46b03ec62 (diff) | |
| parent | 543d226589d152a27a5c150e415b451e50986c79 (diff) | |
| download | rust-bd8f2afc449999aa6310cc9f42029d9bfdd5e910.tar.gz rust-bd8f2afc449999aa6310cc9f42029d9bfdd5e910.zip | |
Auto merge of #3970 - RalfJung:rustup, r=RalfJung
Rustup
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 40502158469..fdd500e90f8 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -1756,6 +1756,14 @@ pub(crate) struct MissingFnParams { } #[derive(Diagnostic)] +#[diag(parse_invalid_path_sep_in_fn_definition)] +pub(crate) struct InvalidPathSepInFnDefinition { + #[primary_span] + #[suggestion(code = "", applicability = "machine-applicable", style = "verbose")] + pub span: Span, +} + +#[derive(Diagnostic)] #[diag(parse_missing_trait_in_trait_impl)] pub(crate) struct MissingTraitInTraitImpl { #[primary_span] @@ -2111,6 +2119,24 @@ pub(crate) enum UnknownPrefixSugg { } #[derive(Diagnostic)] +#[diag(parse_reserved_string)] +#[note] +pub(crate) struct ReservedString { + #[primary_span] + pub span: Span, + #[subdiagnostic] + pub sugg: Option<GuardedStringSugg>, +} +#[derive(Subdiagnostic)] +#[suggestion( + parse_suggestion_whitespace, + code = " ", + applicability = "maybe-incorrect", + style = "verbose" +)] +pub(crate) struct GuardedStringSugg(#[primary_span] pub Span); + +#[derive(Diagnostic)] #[diag(parse_too_many_hashes)] pub(crate) struct TooManyHashes { #[primary_span] @@ -2608,6 +2634,7 @@ pub(crate) struct ExpectedCommaAfterPatternField { #[derive(Diagnostic)] #[diag(parse_unexpected_expr_in_pat)] +#[note] pub(crate) struct UnexpectedExpressionInPattern { /// The unexpected expr's span. #[primary_span] |
