rust/tests/ui/coroutine/borrow-in-tail-expr.rs

12 lines
175 B
Rust

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