mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
26 lines
856 B
Text
26 lines
856 B
Text
error: '`impl Trait` used as a function parameter'
|
|
--> $DIR/impl_trait_in_params.rs:8:13
|
|
|
|
|
LL | pub fn a(_: impl Trait) {}
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::impl-trait-in-params` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::impl_trait_in_params)]`
|
|
help: add a type parameter
|
|
|
|
|
LL | pub fn a<{ /* Generic name */ }: Trait>(_: impl Trait) {}
|
|
| +++++++++++++++++++++++++++++++
|
|
|
|
error: '`impl Trait` used as a function parameter'
|
|
--> $DIR/impl_trait_in_params.rs:11:29
|
|
|
|
|
LL | pub fn c<C: Trait>(_: C, _: impl Trait) {}
|
|
| ^^^^^^^^^^
|
|
|
|
|
help: add a type parameter
|
|
|
|
|
LL | pub fn c<C: Trait, { /* Generic name */ }: Trait>(_: C, _: impl Trait) {}
|
|
| +++++++++++++++++++++++++++++++
|
|
|
|
error: aborting due to 2 previous errors
|
|
|