]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/self/elision/lt-ref-self-async.rs
3 #![allow(non_snake_case)]
7 struct Struct
<'a
> { data: &'a u32 }
10 // Test using `&self` sugar:
12 async
fn ref_self(&self, f
: &u32) -> &u32 {
14 //~^ ERROR lifetime may not live long enough
17 // Test using `&Self` explicitly:
19 async
fn ref_Self(self: &Self, f
: &u32) -> &u32 {
21 //~^ ERROR lifetime may not live long enough
24 async
fn box_ref_Self(self: Box
<&Self>, f
: &u32) -> &u32 {
26 //~^ ERROR lifetime may not live long enough
29 async
fn pin_ref_Self(self: Pin
<&Self>, f
: &u32) -> &u32 {
31 //~^ ERROR lifetime may not live long enough
34 async
fn box_box_ref_Self(self: Box
<Box
<&Self>>, f
: &u32) -> &u32 {
36 //~^ ERROR lifetime may not live long enough
39 async
fn box_pin_Self(self: Box
<Pin
<&Self>>, f
: &u32) -> &u32 {
41 //~^ ERROR lifetime may not live long enough