rust/src/test/ui/issues/issue-39559-2.rs

21 lines
285 B
Rust
Raw Normal View History

trait Dim {
fn dim() -> usize;
}
enum Dim3 {}
impl Dim for Dim3 {
fn dim() -> usize {
3
}
}
fn main() {
let array: [usize; Dim3::dim()]
//~^ ERROR E0015
2018-11-16 18:38:28 +01:00
//~| ERROR E0080
= [0; Dim3::dim()];
//~^ ERROR E0015
2018-11-16 18:38:28 +01:00
//~| ERROR E0080
}