From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/nll/issue-55850.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/ui/nll/issue-55850.rs') 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); impl Iterator for GenIter where - G: Generator + Unpin, + G: Coroutine + Unpin, { type Item = G::Yield; @@ -26,7 +26,7 @@ fn bug<'a>() -> impl Iterator { 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 }) } -- cgit v1.2.3