-
Notifications
You must be signed in to change notification settings - Fork 13k
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
refactor: clean up errors.rs
and error_codes_check.rs
#106341
refactor: clean up errors.rs
and error_codes_check.rs
#106341
Conversation
Move them into new `error_codes.rs` tidy check.
Some changes occurred in diagnostic error codes |
The CI is failing because of a check ensuring error code explanations are not removed. I'm not a big fan of this, what help can outdated documentation be? I want guidance on this and then I'll remove that CI check. |
This comment has been minimized.
This comment has been minimized.
This is a really nice improvements, thanks a lot for working on this. Once my comment is fixed, it'll be good to go! |
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.
I think the error messages are generally good 👍 I have some comments though
I checked it out locally and
We shouldn't emit warnings like that unless it's the user's fault. There should be no "WARNING" in all caps and no "This will become a hard error." I think it would be fine to have something like this as an opt-in (that would definitely be helpful for your followup PRs and anyone helping), but not by default. |
|
Or you could make a |
|
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 looks good, thanks for making the changes, I just have one final nit.
Co-authored-by: Bruno Kolenbrander <[email protected]>
Then let's go! @bors r=mejrs,klensy,GuillaumeGomez rollup |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#106287 (Add some docs to `bug`, `span_bug` and `delay_span_bug`) - rust-lang#106341 (refactor: clean up `errors.rs` and `error_codes_check.rs`) - rust-lang#106453 (Improve include macro documentation) - rust-lang#106466 (Fix rustdoc source code rendering for `#[path = "../path/to/mod.rs"]` links) - rust-lang#106528 (Tiny formatting fix) - rust-lang#106534 (rustdoc-gui: Use new block syntax for define-function in goml scripts) - rust-lang#106542 (Add default and latest stable edition to --edition in rustc (attempt 2)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…aumeGomez Add some UI tests and reword error-code docs Added UI tests for `E0013` and `E0015`. Error code docs for `E0015` were a bit unclear (they referred to all non-const errors in const context, when only non-const functions applied), so I touched them up a bit. I also fixed up some issues in the new `error_codes.rs` tidy check (linked rust-lang#106341), that I overlooked previously. r? `@GuillaumeGomez`
…aumeGomez Add some UI tests and reword error-code docs Added UI tests for `E0013` and `E0015`. Error code docs for `E0015` were a bit unclear (they referred to all non-const errors in const context, when only non-const functions applied), so I touched them up a bit. I also fixed up some issues in the new `error_codes.rs` tidy check (linked rust-lang#106341), that I overlooked previously. r? ``@GuillaumeGomez``
errors.rs
is basically unused now,error_codes_check.rs
is useful but not well commented, etc. It also doesn't check certain things which are certainly not correct. For example,E0505
has a UI test insrc/test/ui/error-codes/
but that test actually outputsE0504
?! Other issues like these exist. I've implemented these with "warnings" which are a bit rough around the edges but should be removed eventually.r? @GuillaumeGomez (again not sure if you want to review but its relevant to you)