2023-09-21 20:37:32 +00:00
|
|
|
error: `impl Trait` used as a function parameter
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/impl_trait_in_params.rs:9:13
|
2023-02-26 00:08:29 +00:00
|
|
|
|
|
|
|
|
LL | pub fn a(_: impl Trait) {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::impl-trait-in-params` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::impl_trait_in_params)]`
|
2023-03-10 09:53:50 +00:00
|
|
|
help: add a type parameter
|
2023-02-26 00:08:29 +00:00
|
|
|
|
|
|
|
|
LL | pub fn a<{ /* Generic name */ }: Trait>(_: impl Trait) {}
|
|
|
|
| +++++++++++++++++++++++++++++++
|
|
|
|
|
2023-09-21 20:37:32 +00:00
|
|
|
error: `impl Trait` used as a function parameter
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/impl_trait_in_params.rs:11:29
|
2023-02-26 00:08:29 +00:00
|
|
|
|
|
|
|
|
LL | pub fn c<C: Trait>(_: C, _: impl Trait) {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2023-03-10 09:53:50 +00:00
|
|
|
help: add a type parameter
|
2023-02-26 00:08:29 +00:00
|
|
|
|
|
|
|
|
LL | pub fn c<C: Trait, { /* Generic name */ }: Trait>(_: C, _: impl Trait) {}
|
|
|
|
| +++++++++++++++++++++++++++++++
|
|
|
|
|
2023-09-21 20:37:32 +00:00
|
|
|
error: `impl Trait` used as a function parameter
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/impl_trait_in_params.rs:36:17
|
2023-09-21 20:37:32 +00:00
|
|
|
|
|
|
|
|
LL | pub fn h(_: impl Trait) {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: add a type parameter
|
|
|
|
|
|
|
|
|
LL | pub fn h<{ /* Generic name */ }: Trait>(_: impl Trait) {}
|
|
|
|
| +++++++++++++++++++++++++++++++
|
|
|
|
|
|
|
|
error: `impl Trait` used as a function parameter
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/impl_trait_in_params.rs:39:45
|
2023-09-21 20:37:32 +00:00
|
|
|
|
|
|
|
|
LL | pub fn k<K: AnotherTrait<u32>>(_: K, _: impl AnotherTrait<u32>) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: add a type parameter
|
|
|
|
|
|
|
|
|
LL | pub fn k<K: AnotherTrait<u32>, { /* Generic name */ }: AnotherTrait<u32>>(_: K, _: impl AnotherTrait<u32>) {}
|
|
|
|
| +++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
2023-02-26 00:08:29 +00:00
|
|
|
|