1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
//! Functions can't use const generics. use unc_sdk::unc; #[derive(Default)] #[unc(contract_state)] struct Ident { value: u32, } #[unc] impl Ident { pub fn is_ident_const<const N: usize>(&self, val: [u32; N]) -> [u32; N] { val } } fn main() {}