diff options
Diffstat (limited to 'tests/ui/coroutine/drop-and-replace.rs')
| -rw-r--r-- | tests/ui/coroutine/drop-and-replace.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/ui/coroutine/drop-and-replace.rs b/tests/ui/coroutine/drop-and-replace.rs index 6e30d76512b..d3d7e000020 100644 --- a/tests/ui/coroutine/drop-and-replace.rs +++ b/tests/ui/coroutine/drop-and-replace.rs @@ -4,7 +4,7 @@ // #60187, this produced incorrect code for coroutines when a saved local was // re-assigned. -#![feature(coroutines, coroutine_trait)] +#![feature(coroutines, coroutine_trait, stmt_expr_attributes)] use std::ops::{Coroutine, CoroutineState}; use std::pin::Pin; @@ -17,7 +17,8 @@ impl Drop for Foo { } fn main() { - let mut a = || { + let mut a = #[coroutine] + || { let mut x = Foo(4); yield; assert_eq!(x.0, 4); |
