-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.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
I tried this code:
use std::process:Command;
use std::fs:File;
fn main() { }
I expected to see this happen: I expected to see two diagnostic messages, telling me about the distinct parse errors on lines 1 and 2.
Instead, this happened: The first error was treated as non-recoverable, yielding this output (playground):
error: expected one of `::`, `;`, or `as`, found `:`
--> src/main.rs:1:17
|
1 | [use std::process:Command;](https://play.rust-lang.org/#)
| ^ expected one of `::`, `;`, or `as`
error: could not compile `playground` due to previous error
I'm assuming recovering in the face of this parse error would be a relatively simple task, given that there is already the :
present that should be a strong hint that someone meant to type ::
. So I'm tagging this with labels indicating that its a good opportunity for someone who wants to acquaint themselves with the code base.
estebank and charmitro
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.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.