]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/type-dependent/issue-67144-1.rs
5 pub fn getn
<const N
: usize>(&self) -> [u8; N
] {
10 fn getn
<const N
: usize>() -> [u8; N
] {
18 let [a
,b
,c
] = getn
::<3>();
20 // cannot pattern-match on an array without a fixed length
21 let [a
,b
,c
] = X
.getn
::<3>();
23 // mismatched types, expected array `[u8; 3]` found array `[u8; _]`
24 let arr
: [u8; 3] = X
.getn
::<3>();