fork/rust

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

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

master
1.4 KiB39 linesraw
1error[E0284]: type annotations needed
2  --> $DIR/issue-69455.rs:29:41
3   |
4LL |     println!("{}", 23u64.test(xs.iter().sum()));
5   |                          ----           ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
6   |                          |
7   |                          type must be known at this point
8   |
9   = note: cannot satisfy `<u64 as Test<_>>::Output == _`
10help: consider specifying the generic argument
11   |
12LL |     println!("{}", 23u64.test(xs.iter().sum::<S>()));
13   |                                            +++++
14
15error[E0283]: type annotations needed
16  --> $DIR/issue-69455.rs:29:41
17   |
18LL |     println!("{}", 23u64.test(xs.iter().sum()));
19   |                          ----           ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
20   |                          |
21   |                          required by a bound introduced by this call
22   |
23note: multiple `impl`s satisfying `u64: Test<_>` found
24  --> $DIR/issue-69455.rs:11:1
25   |
26LL | impl Test<u32> for u64 {
27   | ^^^^^^^^^^^^^^^^^^^^^^
28...
29LL | impl Test<u64> for u64 {
30   | ^^^^^^^^^^^^^^^^^^^^^^
31help: consider specifying the generic argument
32   |
33LL |     println!("{}", 23u64.test(xs.iter().sum::<S>()));
34   |                                            +++++
35
36error: aborting due to 2 previous errors
37
38Some errors have detailed explanations: E0283, E0284.
39For more information about an error, try `rustc --explain E0283`.