@@ -8,6 +8,46 @@ LL | yield true;
88 = help: add `#![feature(coroutines)]` to the crate attributes to enable
99 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010
11+ error[E0658]: yield syntax is experimental
12+ --> $DIR/feature-gate-coroutines.rs:10:16
13+ |
14+ LL | let _ = || yield true;
15+ | ^^^^^^^^^^
16+ |
17+ = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
18+ = help: add `#![feature(coroutines)]` to the crate attributes to enable
19+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
20+
21+ error[E0658]: yield syntax is experimental
22+ --> $DIR/feature-gate-coroutines.rs:18:5
23+ |
24+ LL | yield;
25+ | ^^^^^
26+ |
27+ = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
28+ = help: add `#![feature(coroutines)]` to the crate attributes to enable
29+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
30+
31+ error[E0658]: yield syntax is experimental
32+ --> $DIR/feature-gate-coroutines.rs:19:5
33+ |
34+ LL | yield 0;
35+ | ^^^^^^^
36+ |
37+ = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
38+ = help: add `#![feature(coroutines)]` to the crate attributes to enable
39+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
40+
41+ error[E0658]: yield syntax is experimental
42+ --> $DIR/feature-gate-coroutines.rs:5:5
43+ |
44+ LL | yield true;
45+ | ^^^^^^^^^^
46+ |
47+ = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
48+ = help: add `#![feature(coroutines)]` to the crate attributes to enable
49+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
50+
1151error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks
1252 --> $DIR/feature-gate-coroutines.rs:5:5
1353 |
@@ -46,7 +86,7 @@ error[E0627]: yield expression outside of coroutine literal
4686LL | yield true;
4787 | ^^^^^^^^^^
4888
49- error: aborting due to 5 previous errors
89+ error: aborting due to 9 previous errors
5090
5191Some errors have detailed explanations: E0627, E0658.
5292For more information about an error, try `rustc --explain E0627`.
0 commit comments