rust/tests/ui/resolve/issue-39559.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
255 B
Rust
Raw Normal View History

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()],
2020-11-17 10:44:21 +00:00
//~^ ERROR generic parameters may not be used
_dummy: D,
}
fn main() {}