]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/inherent-associated-constants.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / nll / user-annotations / inherent-associated-constants.rs
1 struct A<'a>(&'a ());
2
3 impl A<'static> {
4     const IC: i32 = 10;
5 }
6
7 fn non_wf_associated_const<'a>(x: i32) {
8     A::<'a>::IC; //~ ERROR lifetime may not live long enough
9 }
10
11 fn wf_associated_const<'a>(x: i32) {
12     A::<'static>::IC;
13 }
14
15 fn main() {}