]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/issues/issue-62504.rs
2 #![allow(incomplete_features)]
3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
10 impl<const X
: usize> HasSize
for ArrayHolder
<X
> {
11 const SIZE
: usize = X
;
14 struct ArrayHolder
<const X
: usize>([u32; X
]);
16 impl<const X
: usize> ArrayHolder
<X
> {
17 pub const fn new() -> Self {
18 ArrayHolder([0; Self::SIZE
])
19 //~^ ERROR constant expression depends on a generic parameter
20 //~| ERROR mismatched types
25 let mut array
= ArrayHolder
::new();