rust/src/test/ui/issues/issue-39559.rs
2018-12-25 21:08:33 -07:00

20 lines
303 B
Rust

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 no function or associated item named `dim` found for type `D` in the current scope
_dummy: D,
}
fn main() {}