summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-consts/associated-const-type-parameter-arrays.rs
blob: 5152d784047a52658e4568be40cbd32c801cdffb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
pub trait Foo {
    const Y: usize;
}

struct Abc;
impl Foo for Abc {
    const Y: usize = 8;
}

struct Def;
impl Foo for Def {
    const Y: usize = 33;
}

pub fn test<A: Foo, B: Foo>() {
    let _array: [u32; <A as Foo>::Y];
    //~^ ERROR generic parameters may not be used
}

fn main() {}