2021-06-15 11:47:17 +02:00
|
|
|
use std::ops::Deref;
|
|
|
|
|
|
|
|
pub struct A;
|
|
|
|
pub struct B;
|
|
|
|
|
2021-07-25 21:41:57 +00:00
|
|
|
// @has recursive_deref/struct.A.html '//h3[@class="code-header in-band"]' '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-07-25 21:41:57 +00:00
|
|
|
// @has recursive_deref/struct.B.html '//h3[@class="code-header in-band"]' '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!()
|
|
|
|
}
|
|
|
|
}
|