about summary refs log tree commit diff
path: root/src/test/rustdoc/recursive-deref.rs
blob: 3d17bce472154e7de09411c3ab85e27b633edcf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use std::ops::Deref;

pub struct A;
pub struct B;

// @has recursive_deref/struct.A.html '//h3[@class="code-header in-band"]' 'impl Deref for A'
impl Deref for A {
    type Target = B;

    fn deref(&self) -> &Self::Target {
        panic!()
    }
}

// @has recursive_deref/struct.B.html '//h3[@class="code-header in-band"]' 'impl Deref for B'
impl Deref for B {
    type Target = A;

    fn deref(&self) -> &Self::Target {
        panic!()
    }
}