]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-65159.stderr
Rollup merge of #103766 - lukas-code:error-in-core, r=Dylan-DPC
[rust.git] / src / test / ui / async-await / issues / issue-65159.stderr
1 error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied
2   --> $DIR/issue-65159.rs:5:20
3    |
4 LL | async fn copy() -> Result<()>
5    |                    ^^^^^^ -- supplied 1 generic argument
6    |                    |
7    |                    expected 2 generic arguments
8    |
9 note: enum defined here, with 2 generic parameters: `T`, `E`
10   --> $SRC_DIR/core/src/result.rs:LL:COL
11    |
12 LL | pub enum Result<T, E> {
13    |          ^^^^^^ -  -
14 help: add missing generic argument
15    |
16 LL | async fn copy() -> Result<(), E>
17    |                             +++
18
19 error[E0282]: type annotations needed
20   --> $DIR/issue-65159.rs:8:5
21    |
22 LL |     Ok(())
23    |     ^^ cannot infer type of the type parameter `E` declared on the enum `Result`
24    |
25 help: consider specifying the generic arguments
26    |
27 LL |     Ok::<(), E>(())
28    |       +++++++++
29
30 error: aborting due to 2 previous errors
31
32 Some errors have detailed explanations: E0107, E0282.
33 For more information about an error, try `rustc --explain E0107`.