about summary refs log tree commit diff
path: root/tests/ui/generator/static-generators.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-19 21:46:28 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-20 21:14:01 +0000
commite96ce20b34789d29e925425da6cf138927b80a79 (patch)
tree4032e01ddd5137d1ee98b69277953f2962bbf14b /tests/ui/generator/static-generators.rs
parent60956837cfbf22bd8edd80f57a856e141f7deb8c (diff)
downloadrust-e96ce20b34789d29e925425da6cf138927b80a79.tar.gz
rust-e96ce20b34789d29e925425da6cf138927b80a79.zip
s/generator/coroutine/
Diffstat (limited to 'tests/ui/generator/static-generators.rs')
-rw-r--r--tests/ui/generator/static-generators.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/ui/generator/static-generators.rs b/tests/ui/generator/static-generators.rs
index 41a8ce56923..f9fd65b9793 100644
--- a/tests/ui/generator/static-generators.rs
+++ b/tests/ui/generator/static-generators.rs
@@ -1,20 +1,20 @@
 // run-pass
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::pin::Pin;
 use std::ops::{Coroutine, CoroutineState};
 
 fn main() {
-    let mut generator = static || {
+    let mut coroutine = static || {
         let a = true;
         let b = &a;
         yield;
         assert_eq!(b as *const _, &a as *const _);
     };
-    // SAFETY: We shadow the original generator variable so have no safe API to
+    // SAFETY: We shadow the original coroutine variable so have no safe API to
     // move it after this point.
-    let mut generator = unsafe { Pin::new_unchecked(&mut generator) };
-    assert_eq!(generator.as_mut().resume(()), CoroutineState::Yielded(()));
-    assert_eq!(generator.as_mut().resume(()), CoroutineState::Complete(()));
+    let mut coroutine = unsafe { Pin::new_unchecked(&mut coroutine) };
+    assert_eq!(coroutine.as_mut().resume(()), CoroutineState::Yielded(()));
+    assert_eq!(coroutine.as_mut().resume(()), CoroutineState::Complete(()));
 }