1 error[E0277]: the trait bound `impl Future<Output = ()>: Generator<_>` is not satisfied
2 --> $DIR/generator-not-future.rs:31:21
4 LL | takes_generator(async_fn());
5 | --------------- ^^^^^^^^^^ the trait `Generator<_>` is not implemented for `impl Future<Output = ()>`
7 | required by a bound introduced by this call
9 note: required by a bound in `takes_generator`
10 --> $DIR/generator-not-future.rs:18:39
12 LL | fn takes_generator<ResumeTy>(_g: impl Generator<ResumeTy, Yield = (), Return = ()>) {}
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_generator`
15 error[E0277]: the trait bound `impl Future<Output = ()>: Generator<_>` is not satisfied
16 --> $DIR/generator-not-future.rs:33:21
18 LL | takes_generator(returns_async_block());
19 | --------------- ^^^^^^^^^^^^^^^^^^^^^ the trait `Generator<_>` is not implemented for `impl Future<Output = ()>`
21 | required by a bound introduced by this call
23 note: required by a bound in `takes_generator`
24 --> $DIR/generator-not-future.rs:18:39
26 LL | fn takes_generator<ResumeTy>(_g: impl Generator<ResumeTy, Yield = (), Return = ()>) {}
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_generator`
29 error[E0277]: the trait bound `[async block@$DIR/generator-not-future.rs:35:21: 35:29]: Generator<_>` is not satisfied
30 --> $DIR/generator-not-future.rs:35:21
32 LL | takes_generator(async {});
33 | --------------- ^^^^^^^^ the trait `Generator<_>` is not implemented for `[async block@$DIR/generator-not-future.rs:35:21: 35:29]`
35 | required by a bound introduced by this call
37 note: required by a bound in `takes_generator`
38 --> $DIR/generator-not-future.rs:18:39
40 LL | fn takes_generator<ResumeTy>(_g: impl Generator<ResumeTy, Yield = (), Return = ()>) {}
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_generator`
43 error[E0277]: `impl Generator<Yield = (), Return = ()>` is not a future
44 --> $DIR/generator-not-future.rs:39:18
46 LL | takes_future(returns_generator());
47 | ------------ ^^^^^^^^^^^^^^^^^^^ `impl Generator<Yield = (), Return = ()>` is not a future
49 | required by a bound introduced by this call
51 = help: the trait `Future` is not implemented for `impl Generator<Yield = (), Return = ()>`
52 = note: impl Generator<Yield = (), Return = ()> must be a future or must implement `IntoFuture` to be awaited
53 note: required by a bound in `takes_future`
54 --> $DIR/generator-not-future.rs:17:26
56 LL | fn takes_future(_f: impl Future<Output = ()>) {}
57 | ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future`
59 error[E0277]: `[generator@$DIR/generator-not-future.rs:41:18: 41:23]` is not a future
60 --> $DIR/generator-not-future.rs:41:18
62 LL | takes_future(|ctx| {
65 | | required by a bound introduced by this call
67 LL | | ctx = yield ();
69 | |_____^ `[generator@$DIR/generator-not-future.rs:41:18: 41:23]` is not a future
71 = help: the trait `Future` is not implemented for `[generator@$DIR/generator-not-future.rs:41:18: 41:23]`
72 = note: [generator@$DIR/generator-not-future.rs:41:18: 41:23] must be a future or must implement `IntoFuture` to be awaited
73 note: required by a bound in `takes_future`
74 --> $DIR/generator-not-future.rs:17:26
76 LL | fn takes_future(_f: impl Future<Output = ()>) {}
77 | ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future`
79 error: aborting due to 5 previous errors
81 For more information about this error, try `rustc --explain E0277`.