blob: 07d3a82b1ed9da3b0ffb06384e3c689b84665cd2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
trait Dim {
fn dim() -> usize;
}
enum Dim3 {}
impl Dim for Dim3 {
fn dim() -> usize {
3
}
}
fn main() {
let array: [usize; Dim3::dim()]
//~^ ERROR E0015
= [0; Dim3::dim()];
//~^ ERROR E0015
}
|