Do not ICE when encountering yield inside async block
This commit is contained in:
parent
a643ee8d69
commit
e5b2c66dea
4 changed files with 18 additions and 3 deletions
6
src/test/ui/generator/async-generator-issue-67158.rs
Normal file
6
src/test/ui/generator/async-generator-issue-67158.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#![feature(generators)]
|
||||
// edition:2018
|
||||
// Regression test for #67158.
|
||||
fn main() {
|
||||
async { yield print!(":C") }; //~ ERROR `async` generators are not yet supported
|
||||
}
|
||||
9
src/test/ui/generator/async-generator-issue-67158.stderr
Normal file
9
src/test/ui/generator/async-generator-issue-67158.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0727]: `async` generators are not yet supported
|
||||
--> $DIR/async-generator-issue-67158.rs:5:13
|
||||
|
|
||||
LL | async { yield print!(":C") };
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0727`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue