mirror of
https://github.com/rust-lang/rust
synced 2024-10-14 20:46:49 +00:00
Add regression test for #112515
This commit is contained in:
parent
810c5176ad
commit
b93ca0146a
30
tests/rustdoc/issue-112515-impl-ty-alias.rs
Normal file
30
tests/rustdoc/issue-112515-impl-ty-alias.rs
Normal file
|
@ -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 = ();
|
||||
}
|
Loading…
Reference in a new issue