Skip to content

Commit

Permalink
Add regression test for rust-lang#112515
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jun 12, 2023
1 parent 810c517 commit b93ca01
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/rustdoc/issue-112515-impl-ty-alias.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Regression test for <https://github.com/rust-lang/rust/issues/112515>.
// 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<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>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>, ()>;
pub struct S<T, U>(T, U);

pub trait A {}

pub trait B<T> {
type P;
}

impl A for u64 {}

impl<T, U> A for S<T, U> {}

impl<T> B<u8> for S<T, ()>
where
T: B<u8>,
<T as B<u8>>::P: A,
{
type P = ();
}

impl<T: A, U, V> B<T> for S<U, V> {
type P = ();
}

0 comments on commit b93ca01

Please sign in to comment.