summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/backcompat/unevaluated-consts.rs
blob: 3f90d22ae2d221f1d4cf1592d92717c0e391f0f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// check-pass

// If we allow the parent generics here without using lazy normalization
// this results in a cycle error.
struct Foo<T, U>(T, U);

impl<T> From<[u8; 1 + 1]> for Foo<T, [u8; 1 + 1]> {
    fn from(value: [u8; 1 + 1]) -> Foo<T, [u8; 1 + 1]> {
        todo!();
    }
}

fn break_me<T>()
where
    [u8; 1 + 1]: From<[u8; 1 + 1]>
{}

fn main() {}