#![allow(unused)] #![warn(clippy::impl_trait_in_params)] //@no-rustfix pub trait Trait {} pub trait AnotherTrait {} // Should warn pub fn a(_: impl Trait) {} //~^ ERROR: '`impl Trait` used as a function parameter' //~| NOTE: `-D clippy::impl-trait-in-params` implied by `-D warnings` pub fn c(_: C, _: impl Trait) {} //~^ ERROR: '`impl Trait` used as a function parameter' fn d(_: impl AnotherTrait) {} // Shouldn't warn pub fn b(_: B) {} fn e>(_: T) {} fn main() {}