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