-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
A-lintArea: New lintsArea: New lintsL-styleLint: Belongs in the style lint groupLint: Belongs in the style lint groupL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
What it does
Currently, Rust have three way to getting min/max of an integers:
- module constants:
std::i32::MAX
- type constants:
i32::MAX
- const methods:
i32::max_value()
(3) is soft-deprecated and replaced by 2) when possible.
T-libs doesn't want to deprecate 1) and 3) now until next Rust edition,
but we have no tools to enforce style for 2),
it is great to have such a lint in Clippy.
Categories (optional)
- Kind: style
Drawbacks
None.
jonasbb
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsL-styleLint: Belongs in the style lint groupLint: Belongs in the style lint groupL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy