Skip to content
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

Update replace_consts lint wrt. stabilized assoc_int_consts feature #5269

Closed
phansch opened this issue Mar 5, 2020 · 1 comment
Closed
Labels
C-question Category: Questions S-needs-discussion Status: Needs further discussion before merging or work can be started

Comments

@phansch
Copy link
Member

phansch commented Mar 5, 2020

rust-lang/rust#68952 stabilized the assoc_int_consts feature for Rust 1.34. For Clippy this is relevant for at least the replace_consts lint:

As far as I can tell, that lint was meant to suggest to use the associated methods on the integer primitives, instead of the constants that have now been soft-deprecated in rust-lang/rust#68952. Although, the lint doesn't really provide a reason why one is better over the other. (Please correct me if I misunderstood that lint)

The RFC also mentions a deprecation of the associated functions the lint is currently suggesting, so we might want to deprecate replace_consts and have a different lint that suggests the associated constants instead of the associated methods 🔄

@phansch phansch added C-question Category: Questions S-needs-discussion Status: Needs further discussion before merging or work can be started labels Mar 5, 2020
@phansch
Copy link
Member Author

phansch commented Mar 5, 2020

Oh, I just found #2380 after the fact, so I'm going to close this issue and continue in #2380

@phansch phansch closed this as completed Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-question Category: Questions S-needs-discussion Status: Needs further discussion before merging or work can be started
Projects
None yet
Development

No branches or pull requests

1 participant