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