fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
749 B22 linesraw
1error[E0283]: type annotations needed
2  --> $DIR/issue-86162-1.rs:7:9
3   |
4LL |     foo(gen()); //<- Do not suggest `foo::<impl Clone>()`!
5   |     --- ^^^ cannot infer type of the type parameter `T` declared on the function `gen`
6   |     |
7   |     required by a bound introduced by this call
8   |
9   = note: cannot satisfy `_: Clone`
10note: required by a bound in `foo`
11  --> $DIR/issue-86162-1.rs:3:16
12   |
13LL | fn foo(x: impl Clone) {}
14   |                ^^^^^ required by this bound in `foo`
15help: consider specifying the generic argument
16   |
17LL |     foo(gen::<T>()); //<- Do not suggest `foo::<impl Clone>()`!
18   |            +++++
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0283`.