4 ms·
If you are fine with saying that stuff like this code may panic (and many people are fine with just that), then it's perfectly doable if false { pa
by im3w1l 4y ago
If you are fine with saying that stuff like this code may panic (and many people are fine with just that), then it's perfectly doable
if false {
panic!()
}
Basically you'd prohibit any call to panic whether they may actually end up running or not.
- jrochkind1 4y agoFair. From the responses, clearly i didn't know what I was talking about, fair enough! 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?