-
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
upper_case_acronyms should not suggest breaking changes to APIs #6974
Comments
Thanks for your report! This seems to be fixed by #6805. |
Thanks! Looks like that's not in the version of clippy released with Rust 1.51.0. Are there plans to do a patch release with this fix? |
Hmm, looking at the PR and issues, it doesn't seem to be discussed so far. |
I really would suggest considering a patch release. |
Thanks for bringing this to our attention! pub enum Wasd {
SomeNAME,
ANotherNAME,
} This ONLY lints on stable right now (beta is already fixed, yay) There are other things already on the point-release pile, maybe we can just sneak this one in...? 😅 point release thread |
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
Since Thursday is the new release and this is fixed in the current beta, I'll close this. Obviously there won't be a point release until Thursday. |
Hi there! Thanks for writing
clippy
and all the useful suggestions it provides :)Unfortunately, there's one lint that I've not been happy about: this new
upper_case_acronyms
lint that's on by default in Rust 1.51. I'm here to complain about two separate issues:(1) I have aesthetic issues with the suggestions it makes.
(2) The more fundamental issue -- it routinely suggests breaking changes to stable, public APIs.
For example, the code here:
https://github.com/withoutboats/camino/blob/8f8d61dc91051b8a2ed013eb2f1fc34c03403bdb/src/lib.rs#L1595-L1629
has enums that are correctly and appropriately named, and match the corresponding names in
std
. However, the lint complains with:Issue 1: the changes it suggests are aesthetically bad.
UNC
in particular is widely understood in the Windows world, and renaming it toUnc
looks ugly and pattern-matches in my head to "Uncle".Issue 2: Even if you disagree about the aesthetics, the lint recommends breaking changes to a public API. A lint like this couldn't possibly be high-value enough to suggest a breaking change to an API.
Please disable this lint by default, or at least for public APIs.
Meta
cargo clippy -V
: clippy 0.1.51 (2fd73fa 2021-03-23)rustc -Vv
:The text was updated successfully, but these errors were encountered: