fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: the trait bound `impl Future<Output = ()>: Generator<_>` is not satisfied 2 --> $DIR/generator-not-future.rs:31:21 3 | 4LL | takes_generator(async_fn()); 5 | --------------- ^^^^^^^^^^ the trait `Generator<_>` is not implemented for `impl Future<Output = ()>` 6 | | 7 | required by a bound introduced by this call 8 | 9note: required by a bound in `takes_generator` 10 --> $DIR/generator-not-future.rs:18:39 11 | 12LL | fn takes_generator<ResumeTy>(_g: impl Generator<ResumeTy, Yield = (), Return = ()>) {} 13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_generator` 14 15error[E0277]: the trait bound `impl Future<Output = ()>: Generator<_>` is not satisfied 16 --> $DIR/generator-not-future.rs:33:21 17 | 18LL | takes_generator(returns_async_block()); 19 | --------------- ^^^^^^^^^^^^^^^^^^^^^ the trait `Generator<_>` is not implemented for `impl Future<Output = ()>` 20 | | 21 | required by a bound introduced by this call 22 | 23note: required by a bound in `takes_generator` 24 --> $DIR/generator-not-future.rs:18:39 25 | 26LL | fn takes_generator<ResumeTy>(_g: impl Generator<ResumeTy, Yield = (), Return = ()>) {} 27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_generator` 28 29error[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 31 | 32LL | takes_generator(async {}); 33 | --------------- ^^^^^^^^ the trait `Generator<_>` is not implemented for `{async block@$DIR/generator-not-future.rs:35:21: 35:29}` 34 | | 35 | required by a bound introduced by this call 36 | 37note: required by a bound in `takes_generator` 38 --> $DIR/generator-not-future.rs:18:39 39 | 40LL | fn takes_generator<ResumeTy>(_g: impl Generator<ResumeTy, Yield = (), Return = ()>) {} 41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_generator` 42 43error[E0277]: `impl Generator<Yield = (), Return = ()>` is not a future 44 --> $DIR/generator-not-future.rs:39:18 45 | 46LL | takes_future(returns_generator()); 47 | ------------ ^^^^^^^^^^^^^^^^^^^ `impl Generator<Yield = (), Return = ()>` is not a future 48 | | 49 | required by a bound introduced by this call 50 | 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 53note: required by a bound in `takes_future` 54 --> $DIR/generator-not-future.rs:17:26 55 | 56LL | fn takes_future(_f: impl Future<Output = ()>) {} 57 | ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future` 58 59error[E0277]: `{generator@$DIR/generator-not-future.rs:41:18: 41:23}` is not a future 60 --> $DIR/generator-not-future.rs:41:18 61 | 62LL | takes_future(|ctx| { 63 | _____------------_^ 64 | | | 65 | | required by a bound introduced by this call 66LL | | 67LL | | ctx = yield (); 68LL | | }); 69 | |_____^ `{generator@$DIR/generator-not-future.rs:41:18: 41:23}` is not a future 70 | 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 73note: required by a bound in `takes_future` 74 --> $DIR/generator-not-future.rs:17:26 75 | 76LL | fn takes_future(_f: impl Future<Output = ()>) {} 77 | ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future` 78 79error: aborting due to 5 previous errors 80 81For more information about this error, try `rustc --explain E0277`.