Skip to content

Suggest: documents about working according to msrv in web site. #8693

Open
@kyoto7250

Description

@kyoto7250

Description

clippy has rules that change behavior depending on msrv.

  • Change the content of warnings

    • ex. [`map_clone`] changes the message if msrv < 1.36.
  • Stop warnings

    • ex. [`filter_map_next] ignore the rule if msrv < 1.30

Their behavior depends on the internal implementation, and currently we have no way to know them except by reading the source code.

The web site indicates that the msrv option is available, but does not say how the behavior is changed as a result of adding the option.

I think it would be more user-friendly to have a document that describes how clippy's behavior changes depending on the value of msrv.

Thank you in advance.


example.

# https://rust-lang.github.io/rust-clippy/master/#map_clone
Configuration
This lint has the following configuration variables:
- msrv: Option<String>: The minimum rust version that the project supports (defaults to None)
  • if msrv >= 1.36, this rule suggests using `copied`.
  • if msrv < 1.36, this rule suggets using `cloned`, because `copied` was estabilished in 1.36.

Version

No response

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-documentationArea: Adding or improving documentationC-enhancementCategory: Enhancement of lints, like adding more cases or adding help messages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions