]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/generator-desc.stderr
remove [async output] from impl Future
[rust.git] / src / test / ui / async-await / generator-desc.stderr
1 error[E0308]: mismatched types
2   --> $DIR/generator-desc.rs:10:25
3    |
4 LL |     fun(async {}, async {});
5    |               --        ^^ expected `async` block, found a different `async` block
6    |               |
7    |               the expected `async` block
8    |
9    = note: expected `async` block `[static generator@$DIR/generator-desc.rs:10:15: 10:17]`
10               found `async` block `[static generator@$DIR/generator-desc.rs:10:25: 10:27]`
11
12 error[E0308]: mismatched types
13   --> $DIR/generator-desc.rs:12:16
14    |
15 LL |     fun(one(), two());
16    |                ^^^^^ expected opaque type, found a different opaque type
17    |
18 note: while checking the return type of the `async fn`
19   --> $DIR/generator-desc.rs:5:16
20    |
21 LL | async fn one() {}
22    |                ^ checked the `Output` of this `async fn`, expected opaque type
23 note: while checking the return type of the `async fn`
24   --> $DIR/generator-desc.rs:6:16
25    |
26 LL | async fn two() {}
27    |                ^ checked the `Output` of this `async fn`, found opaque type
28    = note: expected opaque type `impl Future<Output = ()>` (opaque type at <$DIR/generator-desc.rs:5:16>)
29               found opaque type `impl Future<Output = ()>` (opaque type at <$DIR/generator-desc.rs:6:16>)
30    = help: consider `await`ing on both `Future`s
31    = note: distinct uses of `impl Trait` result in different opaque types
32
33 error[E0308]: mismatched types
34   --> $DIR/generator-desc.rs:14:26
35    |
36 LL |     fun((async || {})(), (async || {})());
37    |                   --     ^^^^^^^^^^^^^^^ expected `async` closure body, found a different `async` closure body
38    |                   |
39    |                   the expected `async` closure body
40    |
41   ::: $SRC_DIR/core/src/future/mod.rs:LL:COL
42    |
43 LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
44    |                                           -------------------------------
45    |                                           |
46    |                                           the expected opaque type
47    |                                           the found opaque type
48    |
49    = note: expected opaque type `impl Future` (`async` closure body)
50               found opaque type `impl Future` (`async` closure body)
51
52 error: aborting due to 3 previous errors
53
54 For more information about this error, try `rustc --explain E0308`.