Closed c410-f3r closed 3 weeks ago
IFAICT, documentation around panic! is about runtime behavior. rustc will automatically point to the panic message at compile-time when working with constants.
panic!
rustc
#![deny(clippy::missing_panics_doc)] pub fn foo<const N: usize>() { const { if N == 0 { panic!(); } } } pub fn main() { foo::<0>(); }
IFAICT, documentation around
panic!
is about runtime behavior.rustc
will automatically point to the panic message at compile-time when working with constants.