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