summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/impl_trait_in_params.stderr
blob: acfcc21445ebcbaae7225f261276f4a14b3335db (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
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`
help: add a type paremeter
   |
LL | pub fn a<{ /* Generic name */ }: Trait>(_: impl Trait) {}
   |         +++++++++++++++++++++++++++++++

error: '`impl Trait` used as a function parameter'
  --> $DIR/impl_trait_in_params.rs:9:29
   |
LL | pub fn c<C: Trait>(_: C, _: impl Trait) {}
   |                             ^^^^^^^^^^
   |
help: add a type paremeter
   |
LL | pub fn c<C: Trait, { /* Generic name */ }: Trait>(_: C, _: impl Trait) {}
   |                  +++++++++++++++++++++++++++++++

error: aborting due to 2 previous errors