]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/generator-desc.stderr
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[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 | async fn one() {}
16    |                - the `Output` of this `async fn`'s expected opaque type
17 LL | async fn two() {}
18    |                - the `Output` of this `async fn`'s found opaque type
19 ...
20 LL |     fun(one(), two());
21    |                ^^^^^ expected opaque type, found a different opaque type
22    |
23    = note: expected opaque type `impl Future` (opaque type at <$DIR/generator-desc.rs:5:16>)
24               found opaque type `impl Future` (opaque type at <$DIR/generator-desc.rs:6:16>)
25    = help: consider `await`ing on both `Future`s
26    = note: distinct uses of `impl Trait` result in different opaque types
27
28 error[E0308]: mismatched types
29   --> $DIR/generator-desc.rs:14:26
30    |
31 LL |     fun((async || {})(), (async || {})());
32    |                   --     ^^^^^^^^^^^^^^^ expected `async` closure body, found a different `async` closure body
33    |                   |
34    |                   the expected `async` closure body
35    | 
36   ::: $SRC_DIR/core/src/future/mod.rs:LL:COL
37    |
38 LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
39    |                                           -------------------------------
40    |                                           |
41    |                                           the expected opaque type
42    |                                           the found opaque type
43    |
44    = note: expected opaque type `impl Future` (`async` closure body)
45               found opaque type `impl Future` (`async` closure body)
46
47 error: aborting due to 3 previous errors
48
49 For more information about this error, try `rustc --explain E0308`.