-
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
Clean up librustc_typeck error_codes file #65965
Clean up librustc_typeck error_codes file #65965
Conversation
Some changes occurred in diagnostic error codes |
src/librustc_typeck/error_codes.rs
Outdated
compile-time, and is unable to evaluate arbitrary comparison functions. If you | ||
want to capture values of an orderable type between two end-points, you can use | ||
a guard. | ||
Something else than numbers and characters has been used for a range. |
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.
Something else than numbers and characters has been used for a range. | |
Something other than numbers and characters has been used for a range. |
I am personally feeling rather against these changes. They seem to move the main description down below the code example, which would at least for me be harmful rather than helpful (the code example isn't usually all that helpful, as I expect it to be essentially the code I've already written!). As such, I would personally not want to r+ this PR. I'm not sure -- but I suspect it'd be good to codify some guidelines before we go through all of these files and change them around. cc @rust-lang/wg-diagnostics -- seems like you'd be interested and would want to get involved. |
We did make such rules a few years ago. The structure is supposed to be as follows:
|
Do you have a pointer to somewhere where that's documented? If not, would you be willing to make a PR to the forge? I personally think the previously existing "short descriptions" were better than the one-sentence examples this modifies them to -- and would consider them to be pretty short. |
That's why I added @steveklabnik: I don't remember if such resource exists or not and I recall talking about this with him at the time. If it does exist, we need to make it more easily accessible. |
Ping from triage - this PR has sat idle for a week. Thanks |
Actually, it has a merged RFC: rust-lang/rfcs#1567 So I guess it's good to go? Unless if we want to change the RFC? |
@bors r+ rollup Thanks for citing the RFC! It'd be good to perhaps add comments to the top of all the error code files linking to the RFC (http://rust-lang.github.io/rfcs/1567-long-error-codes-explanation-normalization.html)? |
📌 Commit 4a43812049d7e1a5678d71949bdbbd1022f088ef has been approved by |
@bors r- Actually, it'd be great to squash this first. |
4a43812
to
db1dd8f
Compare
Squashed! |
@bors r+ |
📌 Commit db1dd8f has been approved by |
…peck-error-codes, r=Mark-Simulacrum Clean up librustc_typeck error_codes file r? @Dylan-DPC
Rollup of 11 pull requests Successful merges: - #65965 (Clean up librustc_typeck error_codes file) - #66230 (remove vestigial comments referring to defunct numeric trait hierarchy) - #66241 (bump openssl version) - #66257 (Drop long-section-names linker workaround for windows-gnu) - #66263 (make the error message more readable) - #66267 (Add rustdoc doc) - #66276 (Move lock into CodeStats) - #66278 (Fix error message about exported symbols from proc-macro crates) - #66280 (Fix HashSet::union performance) - #66299 (support issue = "none" in unstable attributes ) - #66309 (Tiny cleanup to size assertions) Failed merges: r? @ghost
… r=Mark-Simulacrum Port erased cleanup Just realised that the changes I made in rust-lang#65965 were removed after the move of all error codes so here it is. I made them into separate commits to make the history look better this time. r? @Mark-Simulacrum
… r=Mark-Simulacrum Port erased cleanup Just realised that the changes I made in rust-lang#65965 were removed after the move of all error codes so here it is. I made them into separate commits to make the history look better this time. r? @Mark-Simulacrum
r? @Dylan-DPC