Files
rust/tests/ui/traits/solver-cycles/129541-recursive-struct.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
649 B
Rust
Raw Normal View History

//~ ERROR reached the recursion limit finding the struct tail for `<[Hello] as Normalize>::Assoc`
// Regression test for #129541
//@ revisions: unique_curr unique_next multiple_curr multiple_next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[unique_next] compile-flags: -Znext-solver
//@[multiple_next] compile-flags: -Znext-solver
trait Bound {}
trait Normalize {
type Assoc;
}
#[cfg(any(multiple_curr, multiple_next))]
2025-01-20 16:42:50 +01:00
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() {}