2021-06-15 16:32:22 -05:00
|
|
|
error[E0283]: type annotations needed
|
2022-02-14 06:25:26 -06:00
|
|
|
--> $DIR/issue-86162-1.rs:7:9
|
2021-06-15 16:32:22 -05:00
|
|
|
|
|
|
|
|
LL | foo(gen()); //<- Do not suggest `foo::<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 01:27:22 -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`
|
|
|
|
--> $DIR/issue-86162-1.rs:3:16
|
|
|
|
|
|
|
|
|
LL | fn foo(x: impl Clone) {}
|
|
|
|
| ^^^^^ required by this bound in `foo`
|
2022-02-14 06:25:26 -06:00
|
|
|
help: consider specifying the generic argument
|
|
|
|
|
|
|
|
|
LL | foo(gen::<T>()); //<- Do not suggest `foo::<impl Clone>()`!
|
|
|
|
| +++++
|
2021-06-15 16:32:22 -05:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2021-06-15 16:32:22 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0283`.
|