2019-07-15 04:25:09 -05:00
|
|
|
// check-pass
|
2019-06-28 13:46:45 -05:00
|
|
|
|
|
|
|
#![allow(non_snake_case)]
|
|
|
|
|
|
|
|
use std::rc::Rc;
|
|
|
|
|
|
|
|
struct Struct { }
|
|
|
|
|
|
|
|
impl Struct {
|
|
|
|
fn ref_Struct(self: Struct, f: &u32) -> &u32 {
|
2019-07-15 10:48:28 -05:00
|
|
|
f
|
2019-06-28 13:46:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn box_Struct(self: Box<Struct>, f: &u32) -> &u32 {
|
2019-07-15 10:48:28 -05:00
|
|
|
f
|
2019-06-28 13:46:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn rc_Struct(self: Rc<Struct>, f: &u32) -> &u32 {
|
2019-07-15 10:48:28 -05:00
|
|
|
f
|
2019-06-28 13:46:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn box_box_Struct(self: Box<Box<Struct>>, f: &u32) -> &u32 {
|
2019-07-15 10:48:28 -05:00
|
|
|
f
|
2019-06-28 13:46:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn box_rc_Struct(self: Box<Rc<Struct>>, f: &u32) -> &u32 {
|
2019-07-15 10:48:28 -05:00
|
|
|
f
|
2019-06-28 13:46:45 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|