2021-06-15 16:32:22 -05:00
|
|
|
error[E0283]: type annotations needed
|
2022-02-14 06:25:26 -06:00
|
|
|
--> $DIR/issue-86162-2.rs:12:14
|
2021-06-15 16:32:22 -05:00
|
|
|
|
|
|
|
|
LL | Foo::bar(gen()); //<- Do not suggest `Foo::bar::<impl Clone>()`!
|
2022-06-25 11:28:27 -05:00
|
|
|
| -------- ^^^ cannot infer type of the type parameter `T` declared on the function `gen`
|
|
|
|
| |
|
2022-08-16 18:13:23 -05:00
|
|
|
| required by a bound introduced by this call
|
2021-06-15 16:32:22 -05:00
|
|
|
|
|
|
|
|
= note: cannot satisfy `_: Clone`
|
2021-07-31 11:26:55 -05:00
|
|
|
note: required by a bound in `Foo::bar`
|
|
|
|
--> $DIR/issue-86162-2.rs:8:20
|
|
|
|
|
|
|
|
|
LL | fn bar(x: impl Clone) {}
|
|
|
|
| ^^^^^ required by this bound in `Foo::bar`
|
2022-02-14 06:25:26 -06:00
|
|
|
help: consider specifying the generic argument
|
|
|
|
|
|
|
|
|
LL | Foo::bar(gen::<T>()); //<- Do not suggest `Foo::bar::<impl Clone>()`!
|
|
|
|
| +++++
|
2021-06-15 16:32:22 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0283`.
|