2021-06-15 11:47:17 +02:00
|
|
|
use std::ops::Deref;
|
|
|
|
|
|
|
|
pub struct A;
|
|
|
|
pub struct B;
|
|
|
|
|
2021-06-16 14:42:51 +02:00
|
|
|
// @has recursive_deref/struct.A.html '//code' 'impl Deref for A'
|
2021-06-15 11:47:17 +02:00
|
|
|
impl Deref for A {
|
|
|
|
type Target = B;
|
|
|
|
|
|
|
|
fn deref(&self) -> &Self::Target {
|
|
|
|
panic!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-16 14:42:51 +02:00
|
|
|
// @has recursive_deref/struct.B.html '//code' 'impl Deref for B'
|
2021-06-15 11:47:17 +02:00
|
|
|
impl Deref for B {
|
|
|
|
type Target = A;
|
|
|
|
|
|
|
|
fn deref(&self) -> &Self::Target {
|
|
|
|
panic!()
|
|
|
|
}
|
|
|
|
}
|