]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / suggestions / lifetimes / missing-lifetimes-in-signature-2.rs
1 // Regression test for #81650
2
3 struct Foo<'a> {
4 x: &'a mut &'a i32,
5 }
6
7 impl<'a> Foo<'a> {
8 fn bar<F, T>(&self, f: F)
9 where
10 F: FnOnce(&Foo<'a>) -> T,
11 F: 'a,
12 {}
13 }
14
15 trait Test {
16 fn test(&self);
17 }
18
19 fn func<T: Test>(foo: &Foo, t: T) {
20 foo.bar(move |_| {
21 //~^ ERROR the parameter type `T` may not live long enough
22 t.test();
23 });
24 }
25
26 fn main() {}