rust-lang/rust-clippy

Support for upcoming `param_attrs` feature

Open

#4.474 geöffnet am 30. Aug. 2019

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (1.391 Forks)batch import
C-enhancementE-needs-testS-needs-discussiongood first issue

Repository-Metriken

Stars
 (10.406 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 19T 22h) (113 gemergte PRs in 30 T)

Beschreibung

param_attrs is likely to be stabilized in Rust 1.39

The param_attrs feature is going to allow lint attributes on function, method and closure parameters:

fn foo(
    a: i32,
    #[allow(unused_variables)] b: i32,
) {}

We should review how this feature ties in with our existing lints. Apparently it did not cause any toolstate breakage when it was merged.

Specifically, we should create a list of lints that could benefit from parameter attributes and then update those lints to make use of them (if that's even required).

Contributor Guide