diff --git a/tests/rustdoc/issue-112515-impl-ty-alias.rs b/tests/rustdoc/issue-112515-impl-ty-alias.rs new file mode 100644 index 00000000000..161188ee576 --- /dev/null +++ b/tests/rustdoc/issue-112515-impl-ty-alias.rs @@ -0,0 +1,30 @@ +// Regression test for . +// It's to ensure that this code doesn't have infinite loop in rustdoc when +// trying to retrive type alias implementations. + +// ignore-tidy-linelength + +pub type Boom = S, ()>, ()>, ()>, u8>, ()>, u8>, ()>, u8>, u8>, ()>, ()>, ()>, u8>, u8>, u8>, ()>, ()>, u8>, ()>, ()>, ()>, u8>, u8>, ()>, ()>, ()>, ()>, ()>, u8>, ()>, ()>, u8>, ()>, ()>, ()>, u8>, ()>, ()>, u8>, u8>, u8>, u8>, ()>, u8>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>; +pub struct S(T, U); + +pub trait A {} + +pub trait B { + type P; +} + +impl A for u64 {} + +impl A for S {} + +impl B for S +where + T: B, + >::P: A, +{ + type P = (); +} + +impl B for S { + type P = (); +}