fix rustdoc stack overflow on mutually recursive Deref

fix #85095
This commit is contained in:
Trinity Pointard 2021-06-15 11:47:17 +02:00
parent 9089771daf
commit aee50f417f
2 changed files with 39 additions and 3 deletions

View file

@ -0,0 +1,22 @@
use std::ops::Deref;
pub struct A;
pub struct B;
// @has issue_85095/struct.A.html '//code' 'impl Deref for A'
impl Deref for A {
type Target = B;
fn deref(&self) -> &Self::Target {
panic!()
}
}
// @has issue_85095/struct.B.html '//code' 'impl Deref for B'
impl Deref for B {
type Target = A;
fn deref(&self) -> &Self::Target {
panic!()
}
}