1 error[E0308]: mismatched types
2 --> $DIR/generator-desc.rs:10:25
4 LL | fun(async {}, async {});
7 | | expected `async` block, found a different `async` block
8 | | arguments to this function are incorrect
9 | the expected `async` block
11 = note: expected `async` block `[static generator@$DIR/generator-desc.rs:10:15: 10:17]`
12 found `async` block `[static generator@$DIR/generator-desc.rs:10:25: 10:27]`
13 note: function defined here
14 --> $SRC_DIR/core/src/future/mod.rs:LL:COL
16 LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
19 error[E0308]: mismatched types
20 --> $DIR/generator-desc.rs:12:16
22 LL | fun(one(), two());
23 | --- ^^^^^ expected opaque type, found a different opaque type
25 | arguments to this function are incorrect
27 note: while checking the return type of the `async fn`
28 --> $DIR/generator-desc.rs:5:16
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
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
44 LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
47 error[E0308]: mismatched types
48 --> $DIR/generator-desc.rs:14:26
50 LL | fun((async || {})(), (async || {})());
51 | --- -- ^^^^^^^^^^^^^^^ expected `async` closure body, found a different `async` closure body
53 | | the expected `async` closure body
54 | arguments to this function are incorrect
56 ::: $SRC_DIR/core/src/future/mod.rs:LL:COL
58 LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
59 | -------------------------------
61 | the expected opaque type
62 | the found opaque type
64 = note: expected opaque type `impl Future<Output = ()>` (`async` closure body)
65 found opaque type `impl Future<Output = ()>` (`async` closure body)
66 note: function defined here
67 --> $DIR/generator-desc.rs:8:4
69 LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
72 error: aborting due to 3 previous errors
74 For more information about this error, try `rustc --explain E0308`.