about summary refs log tree commit diff
path: root/tests/ui/coroutine
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/coroutine')
-rw-r--r--tests/ui/coroutine/gen_block.none.stderr14
-rw-r--r--tests/ui/coroutine/gen_block.rs3
2 files changed, 15 insertions, 2 deletions
diff --git a/tests/ui/coroutine/gen_block.none.stderr b/tests/ui/coroutine/gen_block.none.stderr
index d5ed28c5317..f1dd125efba 100644
--- a/tests/ui/coroutine/gen_block.none.stderr
+++ b/tests/ui/coroutine/gen_block.none.stderr
@@ -24,6 +24,16 @@ error[E0422]: cannot find struct, variant or union type `gen` in this scope
 LL |     gen {};
    |     ^^^ not found in this scope
 
-error: aborting due to 4 previous errors
+error[E0658]: yield syntax is experimental
+  --> $DIR/gen_block.rs:14:16
+   |
+LL |     let _ = || yield true;
+   |                ^^^^^^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+
+error: aborting due to 5 previous errors
 
-For more information about this error, try `rustc --explain E0422`.
+Some errors have detailed explanations: E0422, E0658.
+For more information about an error, try `rustc --explain E0422`.
diff --git a/tests/ui/coroutine/gen_block.rs b/tests/ui/coroutine/gen_block.rs
index c09fa2ae9be..041dcf0c02a 100644
--- a/tests/ui/coroutine/gen_block.rs
+++ b/tests/ui/coroutine/gen_block.rs
@@ -11,4 +11,7 @@ fn main() {
     //[none]~| ERROR: cannot find
     gen {};
     //[none]~^ ERROR: cannot find
+
+    // FIXME(gen_blocks): should also error in 2024 edition
+    let _ = || yield true; //[none]~ ERROR yield syntax is experimental
 }