mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00
17 lines
474 B
Rust
17 lines
474 B
Rust
// revisions: e2024 none
|
|
//[e2024] compile-flags: --edition 2024 -Zunstable-options
|
|
|
|
fn main() {
|
|
yield true; //[none]~ ERROR yield syntax is experimental
|
|
//~^ ERROR yield expression outside of coroutine literal
|
|
|
|
let _ = || yield true; //[none]~ ERROR yield syntax is experimental
|
|
}
|
|
|
|
#[cfg(FALSE)]
|
|
fn foo() {
|
|
// Ok in 2024 edition
|
|
yield; //[none]~ ERROR yield syntax is experimental
|
|
yield 0; //[none]~ ERROR yield syntax is experimental
|
|
}
|