2023-02-25 18:08:29 -06:00
|
|
|
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`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::impl_trait_in_params)]`
|
2023-03-10 03:53:50 -06:00
|
|
|
help: add a type parameter
|
2023-02-25 18:08:29 -06:00
|
|
|
|
|
|
|
|
LL | pub fn a<{ /* Generic name */ }: Trait>(_: impl Trait) {}
|
|
|
|
| +++++++++++++++++++++++++++++++
|
|
|
|
|
|
|
|
error: '`impl Trait` used as a function parameter'
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/impl_trait_in_params.rs:11:29
|
2023-02-25 18:08:29 -06:00
|
|
|
|
|
|
|
|
LL | pub fn c<C: Trait>(_: C, _: impl Trait) {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2023-03-10 03:53:50 -06:00
|
|
|
help: add a type parameter
|
2023-02-25 18:08:29 -06:00
|
|
|
|
|
|
|
|
LL | pub fn c<C: Trait, { /* Generic name */ }: Trait>(_: C, _: impl Trait) {}
|
|
|
|
| +++++++++++++++++++++++++++++++
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|