]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/elision/lt-self.rs
Rollup merge of #63055 - Mark-Simulacrum:save-analysis-clean-2, r=Xanewok
[rust.git] / src / test / ui / self / elision / lt-self.rs
1 // check-pass
2
3 #![feature(arbitrary_self_types)]
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     fn take_self(self, f: &u32) -> &u32 {
15         f
16     }
17
18     fn take_Self(self: Self, f: &u32) -> &u32 {
19         f
20     }
21
22     fn take_Box_Self(self: Box<Self>, f: &u32) -> &u32 {
23         f
24     }
25
26     fn take_Box_Box_Self(self: Box<Box<Self>>, f: &u32) -> &u32 {
27         f
28     }
29
30     fn take_Rc_Self(self: Rc<Self>, f: &u32) -> &u32 {
31         f
32     }
33
34     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() { }