2023-01-19 15:24:47 +00:00
|
|
|
error: '`impl Trait` used as a function parameter'
|
2023-01-13 11:54:51 +00:00
|
|
|
--> $DIR/impl_trait_in_params.rs:8:13
|
2023-01-09 23:18:24 +00:00
|
|
|
|
|
|
|
|
LL | pub fn a(_: impl Trait) {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2023-01-13 11:54:51 +00:00
|
|
|
= note: `-D clippy::impl-trait-in-params` implied by `-D warnings`
|
2023-02-27 20:17:25 +00:00
|
|
|
help: add a type parameter
|
2023-01-09 23:18:24 +00:00
|
|
|
|
|
2023-02-18 19:05:30 +00:00
|
|
|
LL | pub fn a<{ /* Generic name */ }: Trait>(_: impl Trait) {}
|
|
|
|
| +++++++++++++++++++++++++++++++
|
2023-01-09 23:18:24 +00:00
|
|
|
|
2023-01-19 15:24:47 +00:00
|
|
|
error: '`impl Trait` used as a function parameter'
|
2023-01-13 11:54:51 +00:00
|
|
|
--> $DIR/impl_trait_in_params.rs:9:29
|
2023-01-09 23:18:24 +00:00
|
|
|
|
|
|
|
|
LL | pub fn c<C: Trait>(_: C, _: impl Trait) {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2023-02-27 20:17:25 +00:00
|
|
|
help: add a type parameter
|
2023-01-09 23:18:24 +00:00
|
|
|
|
|
2023-02-18 19:05:30 +00:00
|
|
|
LL | pub fn c<C: Trait, { /* Generic name */ }: Trait>(_: C, _: impl Trait) {}
|
|
|
|
| +++++++++++++++++++++++++++++++
|
2023-01-09 23:18:24 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|