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