-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Parser updates for #67131 #3578
Comments
Well, that PR has extensive tests. I wonder if we can/should import the |
You might want to consider something like the approach |
yeah... On the one hand, we should prioritize merging with rustc parser as soon as possible. On the other hand, I actually think that ra's parser tests, which just dump lossless parse tree, are long-term a better solution than the fully integrated rustc tests, so it might make sense to continue investing in our testing infra. Or, more specifically, that rustc should ultimately be tested by UI tests, but, for the general development, there also should be "layer" tests, which, eg, exercise only the parser, without touching/building the rest of the compiler. This is what I didn't like about rustc_lexer extraction -- this bit of code is still tested mostly via ui tests, so you can't pull |
I think that's fine as long the UI tests are there exercising important logic in the parser. I don't see dumping lossless parse trees as something more robust however as compared to |
Hm, I agree with your reasoning. I think I confuse two different differences here:
But, in theory, it should be possible to produce UI tests from the parser library, without the rest of the compiler. |
For what its worth, once you have built the compiler then incremental compilation for modifying I have ideas to improve this even further (as I don't want to wait a lot when hacking on the parser myself), but the biggest wins are already taken:
|
Update: we support |
See rust-lang/rust#67131.
I tried the following as a quick test:
RA reports parsing errors on
default fn
in a trait and onfn bar(..., x: usize)
.The text was updated successfully, but these errors were encountered: