]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/generator-desc.stderr
Rollup merge of #107559 - WaffleLapkin:is_it_2015¿, r=davidtwco
[rust.git] / tests / 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 error[E0308]: mismatched types
17   --> $DIR/generator-desc.rs:12:16
18    |
19 LL |     fun(one(), two());
20    |     ---        ^^^^^ expected opaque type, found a different opaque type
21    |     |
22    |     arguments to this function are incorrect
23    |
24    = note: expected opaque type `impl Future<Output = ()>` (opaque type at <$DIR/generator-desc.rs:5:16>)
25               found opaque type `impl Future<Output = ()>` (opaque type at <$DIR/generator-desc.rs:6:16>)
26    = help: consider `await`ing on both `Future`s
27    = note: distinct uses of `impl Trait` result in different opaque types
28 note: function defined here
29   --> $DIR/generator-desc.rs:8:4
30    |
31 LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
32    |    ^^^                                -----
33
34 error[E0308]: mismatched types
35   --> $DIR/generator-desc.rs:14:26
36    |
37 LL |     fun((async || {})(), (async || {})());
38    |     ---           --     ^^^^^^^^^^^^^^^ expected `async` closure body, found a different `async` closure body
39    |     |             |
40    |     |             the expected `async` closure body
41    |     arguments to this function are incorrect
42    |
43    = note: expected `async` closure body `[async closure body@$DIR/generator-desc.rs:14:19: 14:21]`
44               found `async` closure body `[async closure body@$DIR/generator-desc.rs:14:36: 14:38]`
45 note: function defined here
46   --> $DIR/generator-desc.rs:8:4
47    |
48 LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
49    |    ^^^                                -----
50
51 error: aborting due to 3 previous errors
52
53 For more information about this error, try `rustc --explain E0308`.