about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/impl_trait_in_params.stderr
blob: c904d5843c93f2546048abe3f5fb1e26b20b6480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
error: `impl Trait` used as a function parameter
  --> tests/ui/impl_trait_in_params.rs:9: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
  --> tests/ui/impl_trait_in_params.rs:12: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: `impl Trait` used as a function parameter
  --> tests/ui/impl_trait_in_params.rs:37:17
   |
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
  --> tests/ui/impl_trait_in_params.rs:41:45
   |
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