2023-01-09 17:18:24 -06:00
|
|
|
#![allow(unused)]
|
2023-01-13 05:17:30 -06:00
|
|
|
#![warn(clippy::impl_trait_in_params)]
|
2023-01-09 17:18:24 -06:00
|
|
|
|
|
|
|
pub trait Trait {}
|
2023-01-13 05:54:51 -06:00
|
|
|
pub trait AnotherTrait<T> {}
|
2023-01-09 17:18:24 -06:00
|
|
|
|
|
|
|
// Should warn
|
|
|
|
pub fn a(_: impl Trait) {}
|
|
|
|
pub fn c<C: Trait>(_: C, _: impl Trait) {}
|
2023-01-13 05:54:51 -06:00
|
|
|
fn d(_: impl AnotherTrait<u32>) {}
|
2023-01-09 17:18:24 -06:00
|
|
|
|
|
|
|
// Shouldn't warn
|
|
|
|
|
|
|
|
pub fn b<B: Trait>(_: B) {}
|
2023-01-13 05:54:51 -06:00
|
|
|
fn e<T: AnotherTrait<u32>>(_: T) {}
|
2023-01-09 17:18:24 -06:00
|
|
|
|
|
|
|
fn main() {}
|