Skip to content

Commit b93ca01

Browse files
Add regression test for #112515
1 parent 810c517 commit b93ca01

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/112515>.
2+
// It's to ensure that this code doesn't have infinite loop in rustdoc when
3+
// trying to retrive type alias implementations.
4+
5+
// ignore-tidy-linelength
6+
7+
pub type Boom = S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<S<u64, u8>, ()>, ()>, ()>, u8>, ()>, u8>, ()>, u8>, u8>, ()>, ()>, ()>, u8>, u8>, u8>, ()>, ()>, u8>, ()>, ()>, ()>, u8>, u8>, ()>, ()>, ()>, ()>, ()>, u8>, ()>, ()>, u8>, ()>, ()>, ()>, u8>, ()>, ()>, u8>, u8>, u8>, u8>, ()>, u8>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>;
8+
pub struct S<T, U>(T, U);
9+
10+
pub trait A {}
11+
12+
pub trait B<T> {
13+
type P;
14+
}
15+
16+
impl A for u64 {}
17+
18+
impl<T, U> A for S<T, U> {}
19+
20+
impl<T> B<u8> for S<T, ()>
21+
where
22+
T: B<u8>,
23+
<T as B<u8>>::P: A,
24+
{
25+
type P = ();
26+
}
27+
28+
impl<T: A, U, V> B<T> for S<U, V> {
29+
type P = ();
30+
}

0 commit comments

Comments
 (0)