-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTD-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
fn main() {
String:::new();
}
Current output
error: expected identifier, found `:`
--> src/main.rs:2:13
|
2 | String:::new();
| ^ expected identifier
|
help: maybe write a path separator here
|
2 | String::::new();
| ~~
Desired output
error: path separator must be a double colon
--> src/main.rs:2:11
|
2 | String:::new();
| ^
|
help: use a double colon instead
|
2 | String::new();
| ~
Rationale and extra context
Current suggestion for :::
is not correct, but the one for :
is, so the :::
version should be fixed.
Other cases
error: path separator must be a double colon
--> src/main.rs:2:11
|
2 | String:new();
| ^
|
help: use a double colon instead
|
2 | String::new();
| +
Rust Version
1.83 on playground
Anything else?
No response
VorpalBlade and Degubi
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTD-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.