-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A :
instead of a ::
in a path of a use
item should be a recoverable parsing error
#103269
Comments
(This needs a mentor. I am thinking that if someone doesn't pick it up by Friday, then I will see about using it as the basis for one or more instructional videos.) |
I can mentor whoever wants to work on this. See https://github.com/rust-lang/rust/blob/master/compiler/rustc_parse/src/parser/item.rs#L950 for the general area where changes need to be made, and ping me if someone needs help on Zulip. |
May I work on this? |
You can claim an issue with rustbot, and I recommend checking out the rustc dev guide to find out what the contribution process looks like. |
@compiler-errors i would like to work on this with your help. |
@rustbot claim |
@rustbot release-assignment |
This is mostly about adding checks around However, we would also need the ability to recover to be configurable as arguments to PS: don't take this as is.. I am not that familiar with ast and recovery, but I think this is the main idea |
I will take a quick look into this. |
…aretor, r=compiler-errors Parser: Recover from using colon as path separator in imports I don't know if this is the right approach, any feedback is welcome. r? `@compiler-errors` Fixes rust-lang#103269
…aretor, r=compiler-errors Parser: Recover from using colon as path separator in imports I don't know if this is the right approach, any feedback is welcome. r? ``@compiler-errors`` Fixes rust-lang#103269
…aretor, r=compiler-errors Parser: Recover from using colon as path separator in imports I don't know if this is the right approach, any feedback is welcome. r? ```@compiler-errors``` Fixes rust-lang#103269
I tried this code:
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):
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.The text was updated successfully, but these errors were encountered: