Closed
Description
With:
#![feature(async_await)]
fn foo() {
async {
break;
};
}
you get:
error[E0267]: `break` inside of a closure
--> src/lib.rs:5:9
|
5 | break;
| ^^^^^ cannot break inside of a closure
Note how it references "a closure" which seems confusing for a user who doesn't presume the implementation.
Metadata
Metadata
Assignees
Labels
Area: Async & AwaitArea: Messages for errors, warnings, and lintsAsync-await issues that have been triaged during a working group meeting.Category: An issue proposing an enhancement or a PR with one.Relevant to the compiler team, which will review and decide on the PR/issue.This issue requires a nightly compiler in some way.