Fix a coroutine UI test which is missing #[coroutine]#156171
Conversation
|
Some changes occurred in coverage tests. cc @Zalathar |
|
r? @BoxyUwU rustbot has assigned @BoxyUwU. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| @@ -50,8 +50,9 @@ fn closure_sig() -> impl Sized { | |||
| } | |||
There was a problem hiding this comment.
The code was the same as this test, which doesn't make sense, and makes it look like a copy-paste typo.
Edit: sigh, I selected all the test code, but it looks like GitHub decided to hide the lines outside the diff.
| @@ -46,26 +46,26 @@ error[E0720]: cannot resolve opaque type | |||
| LL | fn closure_sig() -> impl Sized { | |||
| | ^^^^^^^^^^ | |||
|
|
|||
| error[E0720]: cannot resolve opaque type | |||
| --> $DIR/recursive-impl-trait-type-indirect.rs:52:23 | |||
| error[E0282]: type annotations needed | |||
There was a problem hiding this comment.
We are not quite there yet. The point of the test is to forbid recursive types. We want to get error E0720, but with a #[coroutine]. You are right this was a copy-paste error, but we need to guide type inference a bit to get a E0720 error and not a type annotations needed error.

This looks like a typo, although the test now produces a different error to the other errors in the file.
I also fixed some comment typos in tests, happy to drop that commit if you don't want to review it.