diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:42 +0000 |
commit | cec1877e180393eba0f6ddb0cf97bf3a791631c7 (patch) | |
tree | 47b4dac2a9dd9a40c30c251b4d4a72d7ccf77e9f /tests/ui/liveness | |
parent | Adding debian version 1.74.1+dfsg1-1. (diff) | |
download | rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.tar.xz rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/liveness')
-rw-r--r-- | tests/ui/liveness/liveness-upvars.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/liveness/liveness-upvars.rs b/tests/ui/liveness/liveness-upvars.rs index d446d57d3..17158dfbc 100644 --- a/tests/ui/liveness/liveness-upvars.rs +++ b/tests/ui/liveness/liveness-upvars.rs @@ -1,6 +1,6 @@ // edition:2018 // check-pass -#![feature(generators)] +#![feature(coroutines)] #![warn(unused)] #![allow(unreachable_code)] @@ -60,7 +60,7 @@ pub fn f() { }; let _ = async move { println!("{}", c); - // Never read because this is a generator. + // Never read because this is a coroutine. c += 1; //~ WARN value assigned to `c` is never read }; } @@ -110,7 +110,7 @@ async fn yield_now() { todo!(); } -pub fn async_generator() { +pub fn async_coroutine() { let mut state: u32 = 0; let _ = async { @@ -129,7 +129,7 @@ pub fn async_generator() { }; } -pub fn generator() { +pub fn coroutine() { let mut s: u32 = 0; let _ = |_| { s = 0; |