]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/elision/self.rs
Make it more clear when complaining about async fn's return types
[rust.git] / src / test / ui / self / elision / self.rs
1 // check-pass
2
3 #![allow(non_snake_case)]
4
5 use std::rc::Rc;
6
7 struct Struct { }
8
9 impl Struct {
10     fn take_self(self, f: &u32) -> &u32 {
11         f
12     }
13
14     fn take_Self(self: Self, f: &u32) -> &u32 {
15         f
16     }
17
18     fn take_Box_Self(self: Box<Self>, f: &u32) -> &u32 {
19         f
20     }
21
22     fn take_Box_Box_Self(self: Box<Box<Self>>, f: &u32) -> &u32 {
23         f
24     }
25
26     fn take_Rc_Self(self: Rc<Self>, f: &u32) -> &u32 {
27         f
28     }
29
30     fn take_Box_Rc_Self(self: Box<Rc<Self>>, f: &u32) -> &u32 {
31         f
32     }
33 }
34
35 fn main() { }