about summary refs log tree commit diff
path: root/tests/rustdoc-js/search-method-disambiguate.rs
blob: ae884447a92e7ad4ea0b02cdfade5ff47ffe12df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pub trait X {
    type InnerType;
    fn my_method(&self) -> Self::InnerType;
}

pub struct MyTy<T> {
    pub t: T,
}

impl X for MyTy<bool> {
    type InnerType = bool;
    fn my_method(&self) -> bool {
        self.t
    }
}

impl X for MyTy<u8> {
    type InnerType = u8;
    fn my_method(&self) -> u8 {
        self.t
    }
}