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 13:34:03 +00:00
fn main() {
yield true; //~ ERROR yield syntax is experimental
//~^ ERROR yield expression outside of generator literal
2016-12-26 13:34:03 +00:00
}
2019-08-14 03:44:32 +00:00
#[cfg(FALSE)]
fn foo() {
yield; //~ ERROR yield syntax is experimental
yield 0; //~ ERROR yield syntax is experimental
}