diff options
| author | Trinity Pointard <trinity.pointard@gmail.com> | 2021-06-15 11:47:17 +0200 |
|---|---|---|
| committer | Trinity Pointard <trinity.pointard@gmail.com> | 2021-06-15 11:47:17 +0200 |
| commit | aee50f417f38ce57f2491ee86fb386e7d32f241c (patch) | |
| tree | 532c5c2422f1d0de6440402dd177cf4b8114606d /src/test/rustdoc | |
| parent | 9089771daf6b1f1824446cca3306d7c18084eae0 (diff) | |
| download | rust-aee50f417f38ce57f2491ee86fb386e7d32f241c.tar.gz rust-aee50f417f38ce57f2491ee86fb386e7d32f241c.zip | |
fix rustdoc stack overflow on mutually recursive Deref
fix #85095
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/issue-85095.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/rustdoc/issue-85095.rs b/src/test/rustdoc/issue-85095.rs new file mode 100644 index 00000000000..5c4a1da9e59 --- /dev/null +++ b/src/test/rustdoc/issue-85095.rs @@ -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!() + } +} |
