diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-06-12 11:15:04 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-06-12 11:35:19 +0200 |
| commit | b93ca0146af3a8adeee286d3d4dbd561e534a8bf (patch) | |
| tree | f1729823cad9ef974b2d055892aaeac780632a34 /tests/rustdoc | |
| parent | 810c5176ad564190bd7c836aa671b8fb3c3ca302 (diff) | |
| download | rust-b93ca0146af3a8adeee286d3d4dbd561e534a8bf.tar.gz rust-b93ca0146af3a8adeee286d3d4dbd561e534a8bf.zip | |
Add regression test for #112515
Diffstat (limited to 'tests/rustdoc')
| -rw-r--r-- | tests/rustdoc/issue-112515-impl-ty-alias.rs | 30 |
1 files changed, 30 insertions, 0 deletions
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 <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 = (); +} |
