about summary refs log tree commit diff
path: root/tests/rustdoc-ui/deref-generic.rs
blob: 51d6dc3db37bcd281eddf0621b071ad96176367c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ check-pass
// #81395: Fix ICE when recursing into Deref target only differing in type args

pub struct Generic<T>(T);

impl<'a> std::ops::Deref for Generic<&'a mut ()> {
    type Target = Generic<&'a ()>;
    fn deref(&self) -> &Self::Target {
        unimplemented!()
    }
}

impl<'a> Generic<&'a ()> {
    pub fn some_method(&self) {}
}