rust/tests/ui/self/elision/struct.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
483 B
Rust
Raw Normal View History

// 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() { }