//@ check-pass // This shouldn't cause a stack overflow when rustdoc is run // https://github.com/rust-lang/rust/issues/56701 use std::ops::Deref; use std::ops::DerefMut; pub trait SimpleTrait { type SimpleT; } impl> SimpleTrait for Outer { type SimpleT = Inner::SimpleT; } pub trait AnotherTrait { type AnotherT; } impl>> AnotherTrait for Simple { type AnotherT = T; } pub struct Unrelated>>(UnrelatedT); impl>> Deref for Unrelated { type Target = Vec; fn deref(&self) -> &Self::Target { &self.0 } } pub fn main() { }