summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/const-argument-non-static-lifetime.rs
blob: 36a569784adf7b1347a8036e34663ca7dcdce6d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// [full] check-pass
// revisions: full min

// regression test for #78180
// compile-flags: -Zsave-analysis

#![cfg_attr(full, feature(generic_const_exprs))]
#![cfg_attr(full, allow(incomplete_features))]
#![allow(dead_code)]

fn test<const N: usize>() {}

fn wow<'a>() -> &'a () {
    test::<{
        let _: &'a (); //[min]~ ERROR a non-static lifetime
        3
    }>();
    &()
}

fn main() {}