fork/rust

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

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

master
1.5 KiB43 linesraw
1error[E0282]: type annotations needed
2  --> $DIR/multidispatch-convert-ambig-dest.rs:26:5
3   |
4LL |     test(22, std::default::Default::default());
5   |     ^^^^ cannot infer type of the type parameter `U` declared on the function `test`
6   |
7help: consider specifying the generic arguments
8   |
9LL |     test::<i32, U>(22, std::default::Default::default());
10   |         ++++++++++
11
12error[E0283]: type annotations needed
13  --> $DIR/multidispatch-convert-ambig-dest.rs:26:5
14   |
15LL |     test(22, std::default::Default::default());
16   |     ^^^^     -------------------------------- type must be known at this point
17   |     |
18   |     cannot infer type of the type parameter `U` declared on the function `test`
19   |
20note: multiple `impl`s satisfying `i32: Convert<_>` found
21  --> $DIR/multidispatch-convert-ambig-dest.rs:8:1
22   |
23LL | impl Convert<i8> for i32 {
24   | ^^^^^^^^^^^^^^^^^^^^^^^^
25...
26LL | impl Convert<i16> for i32 {
27   | ^^^^^^^^^^^^^^^^^^^^^^^^^
28note: required by a bound in `test`
29  --> $DIR/multidispatch-convert-ambig-dest.rs:21:11
30   |
31LL | fn test<T,U>(_: T, _: U)
32   |    ---- required by a bound in this function
33LL | where T : Convert<U>
34   |           ^^^^^^^^^^ required by this bound in `test`
35help: consider specifying the generic arguments
36   |
37LL |     test::<i32, U>(22, std::default::Default::default());
38   |         ++++++++++
39
40error: aborting due to 2 previous errors
41
42Some errors have detailed explanations: E0282, E0283.
43For more information about an error, try `rustc --explain E0282`.