rustc/tests/ui/coroutine/borrow-in-tail-expr.rs
2024-06-24 14:48:22 +02:00

12 lines
175 B
Rust

//@ run-pass
#![feature(coroutines, stmt_expr_attributes)]
fn main() {
let _a = #[coroutine] || {
yield;
let a = String::new();
a.len()
};
}