As this is a lint about "style", and a purely cosmetical choice (using `<A: Trait>` over `impl Trait`), a lot of other files needed to be allowed this lint.
16 lines
260 B
Rust
16 lines
260 B
Rust
#![allow(unused)]
|
|
#![warn(clippy::impl_trait_param)]
|
|
|
|
pub trait Trait {}
|
|
|
|
// Should warn
|
|
pub fn a(_: impl Trait) {}
|
|
pub fn c<C: Trait>(_: C, _: impl Trait) {}
|
|
|
|
// Shouldn't warn
|
|
|
|
pub fn b<B: Trait>(_: B) {}
|
|
fn d<D: Trait>(_: D, _: impl Trait) {}
|
|
|
|
fn main() {}
|