summary refs log tree commit diff
path: root/tests/ui/const-generics/generic-parameter-in-const-expression-39211.rs
blob: b2566e5447119dc95039ddb84a626ac755dd4306 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
trait VecN {
    const DIM: usize;
}
trait Mat {
    type Row: VecN;
}

fn m<M: Mat>() {
    let a = [3; M::Row::DIM];
    //~^ ERROR constant expression depends on a generic parameter
    //~| ERROR constant expression depends on a generic parameter
}
fn main() {
}

// https://github.com/rust-lang/rust/issues/39211