]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/elision/struct-async.rs
Make it more clear when complaining about async fn's return types
[rust.git] / src / test / ui / self / elision / 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 { }
9
10 impl Struct {
11     async fn ref_Struct(self: Struct, f: &u32) -> &u32 {
12         f
13     }
14
15     async fn box_Struct(self: Box<Struct>, f: &u32) -> &u32 {
16         f
17     }
18
19     async fn rc_Struct(self: Rc<Struct>, f: &u32) -> &u32 {
20         f
21     }
22
23     async fn box_box_Struct(self: Box<Box<Struct>>, f: &u32) -> &u32 {
24         f
25     }
26
27     async fn box_rc_Struct(self: Box<Rc<Struct>>, f: &u32) -> &u32 {
28         f
29     }
30 }
31
32 fn main() { }