]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/generator-desc.stderr
Rollup merge of #105482 - wesleywiser:fix_debuginfo_ub, r=tmiasko
[rust.git] / src / test / ui / async-await / generator-desc.stderr
1 error[E0308]: mismatched types
2   --> $DIR/generator-desc.rs:10:19
3    |
4 LL |     fun(async {}, async {});
5    |         --------  ^^^^^^^^
6    |         |         |
7    |         |         expected `async` block, found a different `async` block
8    |         |         arguments to this function are incorrect
9    |         the expected `async` block
10    |
11    = note: expected `async` block `[async block@$DIR/generator-desc.rs:10:9: 10:17]`
12               found `async` block `[async block@$DIR/generator-desc.rs:10:19: 10:27]`
13 note: function defined here
14   --> $SRC_DIR/core/src/future/mod.rs:LL:COL
15    |
16 LL | pub const fn identity_future<O, Fut: Future<Output = O>>(f: Fut) -> Fut {
17    |              ^^^^^^^^^^^^^^^
18
19 error[E0308]: mismatched types
20   --> $DIR/generator-desc.rs:12:16
21    |
22 LL |     fun(one(), two());
23    |     ---        ^^^^^ expected opaque type, found a different opaque type
24    |     |
25    |     arguments to this function are incorrect
26    |
27 note: while checking the return type of the `async fn`
28   --> $DIR/generator-desc.rs:5:16
29    |
30 LL | async fn one() {}
31    |                ^ checked the `Output` of this `async fn`, expected opaque type
32 note: while checking the return type of the `async fn`
33   --> $DIR/generator-desc.rs:6:16
34    |
35 LL | async fn two() {}
36    |                ^ checked the `Output` of this `async fn`, found opaque type
37    = note: expected opaque type `impl Future<Output = ()>` (opaque type at <$DIR/generator-desc.rs:5:16>)
38               found opaque type `impl Future<Output = ()>` (opaque type at <$DIR/generator-desc.rs:6:16>)
39    = help: consider `await`ing on both `Future`s
40    = note: distinct uses of `impl Trait` result in different opaque types
41 note: function defined here
42   --> $DIR/generator-desc.rs:8:4
43    |
44 LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
45    |    ^^^                                -----
46
47 error[E0308]: mismatched types
48   --> $DIR/generator-desc.rs:14:26
49    |
50 LL |     fun((async || {})(), (async || {})());
51    |     ---           --     ^^^^^^^^^^^^^^^ expected `async` closure body, found a different `async` closure body
52    |     |             |
53    |     |             the expected `async` closure body
54    |     arguments to this function are incorrect
55    |
56    = note: expected `async` closure body `[async closure body@$DIR/generator-desc.rs:14:19: 14:21]`
57               found `async` closure body `[async closure body@$DIR/generator-desc.rs:14:36: 14:38]`
58 note: function defined here
59   --> $DIR/generator-desc.rs:8:4
60    |
61 LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
62    |    ^^^                                -----
63
64 error: aborting due to 3 previous errors
65
66 For more information about this error, try `rustc --explain E0308`.