]> git.proxmox.com Git - rustc.git/blob - src/test/ui/self/elision/lt-struct-async.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / self / elision / lt-struct-async.rs
1 // check-pass
2 // edition:2018
3
4 #![allow(non_snake_case)]
5
6 use std::rc::Rc;
7
8 struct Struct<'a> { x: &'a u32 }
9
10 impl<'a> Struct<'a> {
11 async fn take_self(self, f: &u32) -> &u32 {
12 f
13 }
14
15 async fn take_Struct(self: Struct<'a>, f: &u32) -> &u32 {
16 f
17 }
18
19 async fn take_Box_Struct(self: Box<Struct<'a>>, f: &u32) -> &u32 {
20 f
21 }
22
23 async fn take_Box_Box_Struct(self: Box<Box<Struct<'a>>>, f: &u32) -> &u32 {
24 f
25 }
26
27 async fn take_Rc_Struct(self: Rc<Struct<'a>>, f: &u32) -> &u32 {
28 f
29 }
30
31 async fn take_Box_Rc_Struct(self: Box<Rc<Struct<'a>>>, f: &u32) -> &u32 {
32 f
33 }
34 }
35
36 fn main() { }