summaryrefslogtreecommitdiffstats
path: root/tests/ui/resolve/issue-39559.rs
blob: 58d25940733ced12546d2842451ae8b274d4b708 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
trait Dim {
    fn dim() -> usize;
}

enum Dim3 {}

impl Dim for Dim3 {
    fn dim() -> usize {
        3
    }
}

pub struct Vector<T, D: Dim> {
    entries: [T; D::dim()],
    //~^ ERROR generic parameters may not be used
    _dummy: D,
}

fn main() {}