about summary refs log tree commit diff
path: root/tests/ui/coroutine/static-mut-reference-across-yield.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/coroutine/static-mut-reference-across-yield.rs')
-rw-r--r--tests/ui/coroutine/static-mut-reference-across-yield.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/ui/coroutine/static-mut-reference-across-yield.rs b/tests/ui/coroutine/static-mut-reference-across-yield.rs
index 0d8042ed852..40d5fdf2d57 100644
--- a/tests/ui/coroutine/static-mut-reference-across-yield.rs
+++ b/tests/ui/coroutine/static-mut-reference-across-yield.rs
@@ -1,6 +1,6 @@
 //@ build-pass
 
-#![feature(coroutines)]
+#![feature(coroutines, stmt_expr_attributes)]
 
 static mut A: [i32; 5] = [1, 2, 3, 4, 5];
 
@@ -8,13 +8,15 @@ fn is_send_sync<T: Send + Sync>(_: T) {}
 
 fn main() {
     unsafe {
-        let gen_index = static || {
+        let gen_index = #[coroutine]
+        static || {
             let u = A[{
                 yield;
                 1
             }];
         };
-        let gen_match = static || match A {
+        let gen_match = #[coroutine]
+        static || match A {
             i if {
                 yield;
                 true