zlacker

[parent] [thread] 1 comments
1. im3w1l+(OP)[view] [source] 2022-10-02 16:02:45
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.
replies(1): >>jrochk+dw1
2. jrochk+dw1[view] [source] 2022-10-03 02:46:29
>>im3w1l+(OP)
Fair. 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?

[go to top]