]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.rs
2 // ignore-compare-mode-nll
3 //[nll] compile-flags: -Z borrowck=mir
10 fn a(self: Pin
<&Foo
>, f
: &Foo
) -> &Foo { f }
11 //[base]~^ ERROR E0623
12 //[nll]~^^ lifetime may not live long enough
14 fn c(self: Pin
<&Self>, f
: &Foo
, g
: &Foo
) -> (Pin
<&Foo
>, &Foo
) { (self, f) }
15 //[base]~^ ERROR E0623
16 //[nll]~^^ lifetime may not live long enough
19 type Alias
<T
> = Pin
<T
>;
21 fn bar
<'a
>(self: Alias
<&Self>, arg
: &'
a ()) -> &() { arg }
22 //[base]~^ ERROR E0623
23 //[nll]~^^ lifetime may not live long enough