Files
rust/tests/ui/impl_trait_param.rs
blyxyas 8ec9543f13 Add impl_trait_param lint
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.
2023-02-15 21:29:58 +01:00

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() {}