]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/const-argument-non-static-lifetime.rs
Auto merge of #107618 - chriswailes:linker-arg, r=albertlarsan68
[rust.git] / tests / ui / const-generics / const-argument-non-static-lifetime.rs
1 // [full] check-pass
2 // revisions: full min
3
4 // regression test for #78180
5 // compile-flags: -Zsave-analysis
6
7 #![cfg_attr(full, feature(generic_const_exprs))]
8 #![cfg_attr(full, allow(incomplete_features))]
9 #![allow(dead_code)]
10
11 fn test<const N: usize>() {}
12
13 fn wow<'a>() -> &'a () {
14     test::<{
15         let _: &'a (); //[min]~ ERROR a non-static lifetime
16         3
17     }>();
18     &()
19 }
20
21 fn main() {}