16 lines
264 B
Rust
16 lines
264 B
Rust
#![allow(unused)]
|
|
#![warn(clippy::impl_trait_in_params)]
|
|
|
|
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() {}
|