Static UNCONDITIONAL_PANIC
pub static UNCONDITIONAL_PANIC: &'static Lint
Expand description
The unconditional_panic
lint detects an operation that will cause a
panic at runtime.
§Example
ⓘ
let x = 1 / 0;
{{produces}}
§Explanation
This lint detects code that is very likely incorrect because it will
always panic, such as division by zero and out-of-bounds array
accesses. Consider adjusting your code if this is a bug, or using the
panic!
or unreachable!
macro instead in case the panic is intended.