]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/elision/lt-struct.rs
Rollup merge of #63055 - Mark-Simulacrum:save-analysis-clean-2, r=Xanewok
[rust.git] / src / test / ui / self / elision / lt-struct.rs
1 // check-pass
2
3 #![feature(arbitrary_self_types)]
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     fn take_self(self, f: &u32) -> &u32 {
12         f
13     }
14
15     fn take_Struct(self: Struct<'a>, f: &u32) -> &u32 {
16         f
17     }
18
19     fn take_Box_Struct(self: Box<Struct<'a>>, f: &u32) -> &u32 {
20         f
21     }
22
23     fn take_Box_Box_Struct(self: Box<Box<Struct<'a>>>, f: &u32) -> &u32 {
24         f
25     }
26
27     fn take_Rc_Struct(self: Rc<Struct<'a>>, f: &u32) -> &u32 {
28         f
29     }
30
31     fn take_Box_Rc_Struct(self: Box<Rc<Struct<'a>>>, f: &u32) -> &u32 {
32         f
33     }
34 }
35
36 fn main() { }