summary refs log tree commit diff
path: root/tests/ui/lifetimes/tail-expr-in-nested-expr.rs
blob: a8989f22f4b5b2ce4498cb1268e242f241f9b4fb (plain)
1
2
3
4
5
6
7
8
9
//@ edition: 2024
//@ compile-flags: -Zunstable-options

#![feature(shorter_tail_lifetimes)]

fn main() {
    let _ = { String::new().as_str() }.len();
    //~^ ERROR temporary value dropped while borrowed
}