]> git.proxmox.com Git - rustc.git/blob - src/test/ui/self/elision/assoc.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / self / elision / assoc.rs
1 // check-pass
2
3 #![allow(non_snake_case)]
4
5 use std::rc::Rc;
6
7 trait Trait {
8 type AssocType;
9 }
10
11 struct Struct { }
12
13 impl Trait for Struct {
14 type AssocType = Self;
15 }
16
17 impl Struct {
18 fn assoc(self: <Struct as Trait>::AssocType, f: &u32) -> &u32 {
19 f
20 }
21
22 fn box_AssocType(self: Box<<Struct as Trait>::AssocType>, f: &u32) -> &u32 {
23 f
24 }
25
26 fn rc_AssocType(self: Rc<<Struct as Trait>::AssocType>, f: &u32) -> &u32 {
27 f
28 }
29
30 fn box_box_AssocType(self: Box<Box<<Struct as Trait>::AssocType>>, f: &u32) -> &u32 {
31 f
32 }
33
34 fn box_rc_AssocType(self: Box<Rc<<Struct as Trait>::AssocType>>, f: &u32) -> &u32 {
35 f
36 }
37 }
38
39 fn main() { }