rust/tests/ui/lifetimes/tail-expr-in-nested-expr.rs
2024-06-18 04:14:43 +08:00

10 lines
208 B
Rust

//@ edition: 2024
//@ compile-flags: -Zunstable-options
#![feature(shorter_tail_lifetimes)]
fn main() {
let _ = { String::new().as_str() }.len();
//~^ ERROR temporary value dropped while borrowed
}