]> git.proxmox.com Git - rustc.git/blob - tests/ui/self/elision/lt-self-async.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / self / elision / lt-self-async.rs
1 // check-pass
2 // edition:2018
3
4 #![allow(non_snake_case)]
5
6 use std::pin::Pin;
7 use std::rc::Rc;
8
9 struct Struct<'a> {
10 x: &'a u32
11 }
12
13 impl<'a> Struct<'a> {
14 async fn take_self(self, f: &u32) -> &u32 {
15 f
16 }
17
18 async fn take_Self(self: Self, f: &u32) -> &u32 {
19 f
20 }
21
22 async fn take_Box_Self(self: Box<Self>, f: &u32) -> &u32 {
23 f
24 }
25
26 async fn take_Box_Box_Self(self: Box<Box<Self>>, f: &u32) -> &u32 {
27 f
28 }
29
30 async fn take_Rc_Self(self: Rc<Self>, f: &u32) -> &u32 {
31 f
32 }
33
34 async fn take_Box_Rc_Self(self: Box<Rc<Self>>, f: &u32) -> &u32 {
35 f
36 }
37
38 // N/A
39 //fn take_Pin_Self(self: Pin<Self>, f: &u32) -> &u32 {
40 // f
41 //}
42
43 // N/A
44 //fn take_Box_Pin_Self(self: Box<Pin<Self>>, f: &u32) -> &u32 {
45 // f
46 //}
47 }
48
49 fn main() { }