diff options
| author | Ralf Jung <post@ralfj.de> | 2024-10-14 17:04:43 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-10-14 17:04:43 +0200 |
| commit | 9d579f5358d6722fa20cbf243e201defbd5d84b3 (patch) | |
| tree | 456828aefcdd5ca1414414fdb876f8c528d82dff /compiler/rustc_parse/src/errors.rs | |
| parent | 5e6170b97f81b83041666170ceeadefe04d00fb4 (diff) | |
| parent | 17a19e684cdf3ca088af8b4da6a6209d128913f4 (diff) | |
| download | rust-9d579f5358d6722fa20cbf243e201defbd5d84b3.tar.gz rust-9d579f5358d6722fa20cbf243e201defbd5d84b3.zip | |
Merge from rustc
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] |
