-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add diagnostics for rustc_metadata #34970
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks for the PR! However please run |
@@ -1112,6 +1112,7 @@ pub fn diagnostics_registry() -> errors::registry::Registry { | |||
all_errors.extend_from_slice(&rustc_privacy::DIAGNOSTICS); | |||
all_errors.extend_from_slice(&rustc_trans::DIAGNOSTICS); | |||
all_errors.extend_from_slice(&rustc_const_eval::DIAGNOSTICS); | |||
all_errors.extend_from_slice(&rustc_metadata::DIAGNOSTICS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why adding this? (I'm curious)
Also, you didn't follow the guidelines to write error codes that you can find here. |
I didn't think my original messages were in conflict with the guidelines - hopefully there is no problem now |
Looks like the tidy fixes did not work - I'll fix that later today |
Sure, just ping me back once done. |
@GuillaumeGomez should be good now |
OK I'm pretty unsure what the problem is, there are a few test failures |
Now that the metadata diagnostics are registered, it runs some doctests which were not previously registered. So they had never been checked before, and naturally, they failed. I set them to ignore That's not a cop-out: the failing tests were about attributes to |
@GuillaumeGomez All good now, sorry for the hassle! |
@@ -14,14 +14,14 @@ register_long_diagnostics! { | |||
E0454: r##" | |||
A link name was given with an empty name. Erroneous code example: | |||
|
|||
``` | |||
```ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be compile_fail,E0454
and not ignore
.
|
||
Causes of this error: | ||
|
||
```ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be ignore
.
I just checked tidy and RFC things for now. Please update and then I'll check the content. |
In order to fix failing tests of rust-lang#35011
@GuillaumeGomez passing checks |
|
||
Erroneous code xamples: | ||
|
||
```compile_fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the expected error code.
Beside all this, your PR should contain a commit for each error code (so 3 if I'm not wrong). |
I'm going to go ahead and close this PR for inactivity. @jhod0 please feel free to re-open once you've had a chance to address @GuillaumeGomez's comments! <3 |
Part of #32777
Diagnostics messages are added for:
E0466 E0467 E0468 E0469 E0470
Additionally, rustc_driver is modified so that rustc_metadata diagnostics are available at runtime
cc @GuillaumeGomez