rust/tests/ui/coroutine/issue-64620-yield-array-element.rs

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

10 lines
179 B
Rust
Raw Normal View History

2020-03-08 19:12:41 -05:00
// Regression test for #64620
2023-10-19 16:46:28 -05:00
#![feature(coroutines)]
2020-03-08 19:12:41 -05:00
pub fn crash(arr: [usize; 1]) {
2023-10-19 16:46:28 -05:00
yield arr[0]; //~ ERROR: yield expression outside of coroutine literal
2020-03-08 19:12:41 -05:00
}
fn main() {}