diff options
| author | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2024-09-21 20:07:52 +0300 |
|---|---|---|
| committer | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2024-09-21 20:07:52 +0300 |
| commit | e90e2593ea9c29ff6be20ec38b314fb2d6d927a4 (patch) | |
| tree | 58e3df5eeb0ac828eb74bc4bb19ec9e58f3ba27a /compiler/rustc_parse/src/errors.rs | |
| parent | 74fd001cdae0321144a20133f2216ea8a97da476 (diff) | |
| download | rust-e90e2593ea9c29ff6be20ec38b314fb2d6d927a4.tar.gz rust-e90e2593ea9c29ff6be20ec38b314fb2d6d927a4.zip | |
Parser: recover from `:::` to `::`
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index e3e7fcebaaa..e9fe2e6c1dd 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -1571,7 +1571,7 @@ pub(crate) struct ExpectedFnPathFoundFnKeyword { } #[derive(Diagnostic)] -#[diag(parse_path_single_colon)] +#[diag(parse_path_double_colon)] pub(crate) struct PathSingleColon { #[primary_span] pub span: Span, @@ -1584,6 +1584,14 @@ pub(crate) struct PathSingleColon { } #[derive(Diagnostic)] +#[diag(parse_path_double_colon)] +pub(crate) struct PathTripleColon { + #[primary_span] + #[suggestion(applicability = "maybe-incorrect", code = "", style = "verbose")] + pub span: Span, +} + +#[derive(Diagnostic)] #[diag(parse_colon_as_semi)] pub(crate) struct ColonAsSemi { #[primary_span] |
