summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/issue-55850.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/nll/issue-55850.rs')
-rw-r--r--tests/ui/nll/issue-55850.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/ui/nll/issue-55850.rs b/tests/ui/nll/issue-55850.rs
index e6279bd02..fc873af94 100644
--- a/tests/ui/nll/issue-55850.rs
+++ b/tests/ui/nll/issue-55850.rs
@@ -1,16 +1,16 @@
#![allow(unused_mut)]
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
use std::marker::Unpin;
-use std::ops::Generator;
-use std::ops::GeneratorState::Yielded;
+use std::ops::Coroutine;
+use std::ops::CoroutineState::Yielded;
use std::pin::Pin;
pub struct GenIter<G>(G);
impl <G> Iterator for GenIter<G>
where
- G: Generator + Unpin,
+ G: Coroutine + Unpin,
{
type Item = G::Yield;
@@ -26,7 +26,7 @@ fn bug<'a>() -> impl Iterator<Item = &'a str> {
GenIter(move || {
let mut s = String::new();
yield &s[..] //~ ERROR cannot yield value referencing local variable `s` [E0515]
- //~| ERROR borrow may still be in use when generator yields
+ //~| ERROR borrow may still be in use when coroutine yields
})
}