if false {
panic!()
}
Basically you'd prohibit any call to panic whether they may actually end up running or not.But ok, uninformed me would have guessed checking for that would be pretty straightforward in statically typed Rust. Is that something people want? Why isn't there a built-in mechanism to do it?