about summary refs log tree commit diff
path: root/tests/ui/explicit-tail-calls/ctfe-arg-bad-borrow.rs
blob: 0a61c90bd00a7e87caef7961701de98f3f24e799 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![expect(incomplete_features)]
#![feature(explicit_tail_calls)]

pub const fn test(_: &Type) {
    const fn takes_borrow(_: &Type) {}

    let local = Type;
    become takes_borrow(&local);
    //~^ error: `local` does not live long enough
}

struct Type;

fn main() {}