mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
25 lines
775 B
Text
25 lines
775 B
Text
error: 'impl Trait' in the function's parameters
|
|
--> $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: create a generic type here and replace that 'impl Trait' with `T`
|
|
|
|
|
LL | pub fn a<T: Trait>(_: impl Trait) {}
|
|
| ++++++++++
|
|
|
|
error: 'impl Trait' in the function's parameters
|
|
--> $DIR/impl_trait_in_params.rs:9:29
|
|
|
|
|
LL | pub fn c<C: Trait>(_: C, _: impl Trait) {}
|
|
| ^^^^^^^^^^
|
|
|
|
|
help: create a generic type here and replace that `impl Trait` with `T`
|
|
|
|
|
LL | pub fn c<C: Trait, T: Trait>(_: C, _: impl Trait) {}
|
|
| ++++++++++
|
|
|
|
error: aborting due to 2 previous errors
|
|
|