summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-js/impl-trait.rs
blob: d20fdd60ec965397d3bd40134ae1b492aee11c53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
pub trait Aaaaaaa {}

pub trait Bbbbbbb {}

impl Aaaaaaa for () {}
impl Bbbbbbb for () {}

pub fn bbbbbbb() -> impl Aaaaaaa {
    ()
}

pub struct Ccccccc {}

impl Ccccccc {
    pub fn ddddddd(&self) -> impl Aaaaaaa {
        ()
    }
    pub fn eeeeeee(&self, _x: impl Aaaaaaa) -> i32 {
        0
    }
    pub fn fffffff(&self, x: impl Aaaaaaa) -> impl Aaaaaaa {
        x
    }
    pub fn ggggggg(&self) -> impl Aaaaaaa + Bbbbbbb {
        ()
    }
}