Skip to content

Lint for soft-deprecated {integer}::max_value and min_value #5841

Closed
@tesuji

Description

@tesuji

What it does

Currently, Rust have three way to getting min/max of an integers:

  1. module constants: std::i32::MAX
  2. type constants: i32::MAX
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsL-styleLint: Belongs in the style lint groupL-suggestionLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions