const_guards 0.1.3

An attribute macro for compile time constraints on const generics
Documentation
1
2
3
4
5
6
7
8
9
10
11
error[E0080]: evaluation of `f::<0_usize>::{constant#0}` failed
  --> tests/fail/fn.rs:10:1
   |
10 | #[guard(N > 0)]
   | ^^^^^^^^^^^^^^^
   | |
   | the evaluated program panicked at 'guard evaluated to false', $DIR/tests/fail/fn.rs:10:1
   | inside `_f_guard::<0_usize>` at /home/mari/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic.rs:57:9
   | inside `f::<0_usize>::{constant#0}` at $DIR/tests/fail/fn.rs:10:1
   |
   = note: this error originates in the macro `$crate::panic::panic_2021` (in Nightly builds, run with -Z macro-backtrace for more info)