-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Unify E0243, E0244 and E0107 #53525
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
Comments
Minor nit: The link for E0107 actually points to E0243. |
Fixed, thanks! |
Can I take this? Would be my first contribution so might take me a few days. |
@mcr431: absolutely! The diagnostics are in You can then remove rust/src/librustc_typeck/astconv.rs Lines 102 to 106 in ee9bd0f
and just use E0107 instead (you might need to do a little cleaning up in check_generic_arg_count ). Then you can run all the ui tests with --bless to update them to the new error codes (./x.py test src/test/ui -i --stage 1 --bless ). That should be it!
If you have any questions, feel free to ask here or on Discord / #rustc. Once you're done, put |
@varkor Awesome, thanks! |
@varkor GenericArgMismatchErrorCode struct is also used for E0087, E0088, E0089, and E0090 -- too many and too few lifetime and type arguments for functions. Is this supposed to convert those to use E0107 as well ? |
@mcr431: oh, I forgot about those — yes, these should be merged with E0107 too. Then we'll just have a single error for "you didn't give the right number of generic arguments" (the actual error message itself will give the details about which kind of generic argument, and how many, so we don't need to separate the error codes too). Thanks! |
@varkor I ran tests and the ones related to the newly changed error codes have failed (along with others that I assume are related to the changed errors. Am I supposed to modify the tests as well? |
@mcr431: if you run the tests with |
@varkor understood. How should I handle the errors such as ui/error-codes/E0244.rs (as well as all other removed error codes). Should these tests be removed (and then added to ui/error-codes/E0107.rs) or should I just edit them to use 0107 error code? Not super familiar with the testing structure so not sure if this question makes any sense. |
@mcr431: ah, I forgot about those. I would edit them to use the |
@mcr431: taking a closer look, it seems (You could probably also remove the test for |
Didn't realize you said I should remove E0001 and already submitted PR. let me know If i should modify to remove it |
Don't worry about it; it's technically unrelated. |
E0243 and E0244 are both errors about providing the wrong number of generic arguments. Having both is unnecessary: it'd be better if they were unified with E0107 — the analogous error for lifetimes.
GenericArgMismatchErrorCode
can go once this is done.The text was updated successfully, but these errors were encountered: