]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/multidispatch-convert-ambig-dest.stderr
Rollup merge of #106835 - compiler-errors:new-solver-gat-rebase-oops, r=lcnr
[rust.git] / tests / 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    |     ^^^^     -------------------------------- type must be known at this point
17    |     |
18    |     cannot infer type of the type parameter `U` declared on the function `test`
19    |
20 note: multiple `impl`s satisfying `i32: Convert<_>` found
21   --> $DIR/multidispatch-convert-ambig-dest.rs:8:1
22    |
23 LL | impl Convert<i8> for i32 {
24    | ^^^^^^^^^^^^^^^^^^^^^^^^
25 ...
26 LL | impl Convert<i16> for i32 {
27    | ^^^^^^^^^^^^^^^^^^^^^^^^^
28 note: required by a bound in `test`
29   --> $DIR/multidispatch-convert-ambig-dest.rs:21:11
30    |
31 LL | fn test<T,U>(_: T, _: U)
32    |    ---- required by a bound in this
33 LL | where T : Convert<U>
34    |           ^^^^^^^^^^ required by this bound in `test`
35 help: consider specifying the generic arguments
36    |
37 LL |     test::<i32, U>(22, std::default::Default::default());
38    |         ++++++++++
39
40 error: aborting due to 2 previous errors
41
42 Some errors have detailed explanations: E0282, E0283.
43 For more information about an error, try `rustc --explain E0282`.