summaryrefslogtreecommitdiffstats
path: root/tests/ui/generator/issue-64620-yield-array-element.rs
blob: 2cbe8f5161465b11258f799d2c4e7c89de2365d3 (plain)
1
2
3
4
5
6
7
8
9
// Regression test for #64620

#![feature(generators)]

pub fn crash(arr: [usize; 1]) {
    yield arr[0]; //~ ERROR: yield expression outside of generator literal
}

fn main() {}