rust/tests/ui/impl_trait_in_params.stderr

26 lines
689 B
Plaintext
Raw Normal View History

error: '`impl Trait` used as a function parameter'
2023-01-13 05:54:51 -06:00
--> $DIR/impl_trait_in_params.rs:8:13
|
LL | pub fn a(_: impl Trait) {}
| ^^^^^^^^^^
|
2023-01-13 05:54:51 -06:00
= note: `-D clippy::impl-trait-in-params` implied by `-D warnings`
help: add a type paremeter
|
LL | pub fn a<T: Trait>(_: impl Trait) {}
| ++++++++++
error: '`impl Trait` used as a function parameter'
2023-01-13 05:54:51 -06:00
--> $DIR/impl_trait_in_params.rs:9:29
|
LL | pub fn c<C: Trait>(_: C, _: impl Trait) {}
| ^^^^^^^^^^
|
2023-01-25 12:19:16 -06:00
help: add a type paremeter
|
LL | pub fn c<C: Trait, T: Trait>(_: C, _: impl Trait) {}
| ++++++++++
error: aborting due to 2 previous errors