diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2025-07-10 19:49:32 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2025-07-10 19:49:32 +0200 |
| commit | 341f12df67946faf630e6a656f12e504e9721d44 (patch) | |
| tree | 9e775cbf755ab7f26a7d5adb07b56420cb77be98 /tests | |
| parent | e43d139a82620a268d3828a73e12a8679339e8f8 (diff) | |
| download | rust-341f12df67946faf630e6a656f12e504e9721d44.tar.gz rust-341f12df67946faf630e6a656f12e504e9721d44.zip | |
Properly track the depth when expanding free alias types
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/lazy-type-alias/deep-expansion.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/lazy-type-alias/deep-expansion.rs b/tests/ui/lazy-type-alias/deep-expansion.rs new file mode 100644 index 00000000000..c4461abdb81 --- /dev/null +++ b/tests/ui/lazy-type-alias/deep-expansion.rs @@ -0,0 +1,20 @@ +// In several type analysis passes we employ a specialized expansion procedure. +// This procedure used to incorrectly track expansion depth (growing much faster +// than normalization depth) resulting in its internal assertion triggering. +// +// issue: <https://github.com/rust-lang/rust/issues/142419> +//@ check-pass +#![feature(lazy_type_alias)] +#![expect(incomplete_features)] + +type T0 = (T1, T1, T1, T1); +type T1 = (T2, T2, T2, T2); +type T2 = (T3, T3, T3, T3); +type T3 = (T4, T4, T4, T4); +type T4 = (T5, T5, T5, T5); +type T5 = (T6, T6, T6, T6); +type T6 = (T7, T7, T7, T7); +type T7 = (); + +fn accept(_: T0) {} +fn main() {} |
