tests: Add recursive associated type bound regression tests

This commit is contained in:
Martin Nordholts
2024-11-25 18:30:13 +01:00
parent 7db7489f9b
commit b77d8fa129
4 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
// Regression test for #129541
//@ check-pass
trait Bound {}
trait Normalize {
type Assoc;
}
impl<T: Bound> Normalize for T {
type Assoc = T;
}
impl<T: Bound> Normalize for [T] {
type Assoc = T;
}
impl Bound for Hello {}
struct Hello {
a: <[Hello] as Normalize>::Assoc,
}
fn main() {}