rust/tests/ui/feature-gates/feature-gate-generators.rs

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

11 lines
272 B
Rust
Raw Normal View History

2016-12-26 07:34:03 -06:00
fn main() {
yield true; //~ ERROR yield syntax is experimental
//~^ ERROR yield expression outside of generator literal
2016-12-26 07:34:03 -06:00
}
2019-08-13 22:44:32 -05:00
#[cfg(FALSE)]
fn foo() {
yield; //~ ERROR yield syntax is experimental
yield 0; //~ ERROR yield syntax is experimental
}