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

trait Trait<T> {
    const ASSOC_CONST: usize = 0;
}

impl Trait<()> for u8 {}

// `u8::ASSOC_CONST` is resolved today, but will be ambiguous
// under lazy normalization.
fn foo<T, U>() -> [(T, U); u8::ASSOC_CONST]
where
    u8: Trait<T> + Trait<U>,
{
    todo!()
}

fn main() {}