]> git.proxmox.com Git - rustc.git/blame - src/test/ui/self/elision/ref-assoc.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / self / elision / ref-assoc.rs
CommitLineData
dc9dc135
XL
1// check-pass
2
dc9dc135
XL
3#![allow(non_snake_case)]
4
5use std::pin::Pin;
6
7trait Trait {
8 type AssocType;
9}
10
11struct Struct { }
12
13impl Trait for Struct {
14 type AssocType = Self;
15}
16
17impl Struct {
18 fn ref_AssocType(self: &<Struct as Trait>::AssocType, f: &u32) -> &u32 {
19 f
20 }
21
22 fn box_ref_AssocType(self: Box<&<Struct as Trait>::AssocType>, f: &u32) -> &u32 {
23 f
24 }
25
26 fn pin_ref_AssocType(self: Pin<&<Struct as Trait>::AssocType>, f: &u32) -> &u32 {
27 f
28 }
29
30 fn box_box_ref_AssocType(self: Box<Box<&<Struct as Trait>::AssocType>>, f: &u32) -> &u32 {
31 f
32 }
33
34 fn box_pin_ref_AssocType(self: Box<Pin<&<Struct as Trait>::AssocType>>, f: &u32) -> &u32 {
35 f
36 }
37}
38
39fn main() { }