diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-39559.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-39559.rs b/src/test/ui/issues/issue-39559.rs new file mode 100644 index 000000000..58d259407 --- /dev/null +++ b/src/test/ui/issues/issue-39559.rs @@ -0,0 +1,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() {} |