1 2 3 4 5 6 7 8 9 10 11
#![allow(incomplete_features)] #![feature(generic_const_exprs)] extern crate const_guards; use const_guards::guard; fn main() { f::<1>() } #[guard(N > 0)] pub fn f<const N: usize>() {}