rust/tests/ui/traits/new-solver/coroutine.fail.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
2.1 KiB
Plaintext
Raw Normal View History

error[E0277]: the trait bound `{coroutine@$DIR/coroutine.rs:18:21: 18:23}: Coroutine<A>` is not satisfied
--> $DIR/coroutine.rs:18:21
2023-01-24 17:38:20 -06:00
|
2023-10-19 16:46:28 -05:00
LL | needs_coroutine(|| {
2023-01-24 17:38:20 -06:00
| _____---------------_^
| | |
| | required by a bound introduced by this call
LL | |
LL | |
LL | |
LL | | yield ();
LL | | });
| |_____^ the trait `Coroutine<A>` is not implemented for `{coroutine@$DIR/coroutine.rs:18:21: 18:23}`
2023-01-24 17:38:20 -06:00
|
2023-10-19 16:46:28 -05:00
note: required by a bound in `needs_coroutine`
--> $DIR/coroutine.rs:14:28
2023-01-24 17:38:20 -06:00
|
2023-10-19 16:46:28 -05:00
LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `needs_coroutine`
2023-01-24 17:38:20 -06:00
error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:18:21: 18:23} as Coroutine<A>>::Yield == B`
--> $DIR/coroutine.rs:18:21
2023-01-24 17:38:20 -06:00
|
2023-10-19 16:46:28 -05:00
LL | needs_coroutine(|| {
2023-01-24 17:38:20 -06:00
| _____---------------_^
| | |
| | required by a bound introduced by this call
LL | |
LL | |
LL | |
LL | | yield ();
LL | | });
| |_____^ types differ
|
2023-10-19 16:46:28 -05:00
note: required by a bound in `needs_coroutine`
--> $DIR/coroutine.rs:14:41
2023-01-24 17:38:20 -06:00
|
2023-10-19 16:46:28 -05:00
LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
| ^^^^^^^^^ required by this bound in `needs_coroutine`
2023-01-24 17:38:20 -06:00
error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:18:21: 18:23} as Coroutine<A>>::Return == C`
--> $DIR/coroutine.rs:18:21
2023-01-24 17:38:20 -06:00
|
2023-10-19 16:46:28 -05:00
LL | needs_coroutine(|| {
2023-01-24 17:38:20 -06:00
| _____---------------_^
| | |
| | required by a bound introduced by this call
LL | |
LL | |
LL | |
LL | | yield ();
LL | | });
| |_____^ types differ
|
2023-10-19 16:46:28 -05:00
note: required by a bound in `needs_coroutine`
--> $DIR/coroutine.rs:14:52
2023-01-24 17:38:20 -06:00
|
2023-10-19 16:46:28 -05:00
LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
| ^^^^^^^^^^ required by this bound in `needs_coroutine`
2023-01-24 17:38:20 -06:00
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0271, E0277.
For more information about an error, try `rustc --explain E0271`.