]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/generic_const_exprs/issue-62504.rs
2 #![allow(incomplete_features)]
3 #![cfg_attr(full, feature(generic_const_exprs))]
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 mismatched types
20 //[full]~^^ ERROR unconstrained generic constant
21 //[min]~^^^ ERROR constant expression depends on a generic parameter
26 let mut array
= ArrayHolder
::new();