]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/generator-desc.stderr
Use `rust_2018` instead of `!is_rust_2015`
[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: while checking the return type of the `async fn`
25   --> $DIR/generator-desc.rs:5:16
26    |
27 LL | async fn one() {}
28    |                ^ checked the `Output` of this `async fn`, expected opaque type
29 note: while checking the return type of the `async fn`
30   --> $DIR/generator-desc.rs:6:16
31    |
32 LL | async fn two() {}
33    |                ^ checked the `Output` of this `async fn`, found opaque type
34    = note: expected opaque type `impl Future<Output = ()>` (opaque type at <$DIR/generator-desc.rs:5:16>)
35               found opaque type `impl Future<Output = ()>` (opaque type at <$DIR/generator-desc.rs:6:16>)
36    = help: consider `await`ing on both `Future`s
37    = note: distinct uses of `impl Trait` result in different opaque types
38 note: function defined here
39   --> $DIR/generator-desc.rs:8:4
40    |
41 LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
42    |    ^^^                                -----
43
44 error[E0308]: mismatched types
45   --> $DIR/generator-desc.rs:14:26
46    |
47 LL |     fun((async || {})(), (async || {})());
48    |     ---           --     ^^^^^^^^^^^^^^^ expected `async` closure body, found a different `async` closure body
49    |     |             |
50    |     |             the expected `async` closure body
51    |     arguments to this function are incorrect
52    |
53    = note: expected `async` closure body `[async closure body@$DIR/generator-desc.rs:14:19: 14:21]`
54               found `async` closure body `[async closure body@$DIR/generator-desc.rs:14:36: 14:38]`
55 note: function defined here
56   --> $DIR/generator-desc.rs:8:4
57    |
58 LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
59    |    ^^^                                -----
60
61 error: aborting due to 3 previous errors
62
63 For more information about this error, try `rustc --explain E0308`.