]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-72278.rs
point at private fields in struct literal
[rust.git] / src / test / ui / issues / issue-72278.rs
1 // run-pass
2
3 #![allow(unused)]
4
5 struct S;
6
7 impl S {
8     fn func<'a, U>(&'a self) -> U {
9         todo!()
10     }
11 }
12
13 fn dont_crash<'a, U>() -> U {
14     S.func::<'a, U>()
15     //~^ WARN cannot specify lifetime arguments explicitly
16     //~| WARN this was previously accepted
17 }
18
19 fn main() {}