panic
lints for debug_assert
· Issue #7062 · rust-lang/rust-clippy (original) (raw)
Lint name: panic
I tried this code:
debug_assert!(true, "test");
I expected to see this happen: no warning
Instead, this happened: panic
should not be present in production code
I am assuming that the error message is correct in saying that this lint is supposed to remove panics from production code, but debug_assert
isn't present in debug code. So I consider this a false positive.
EDIT: there might be an issue here, my report might be incorrect, because I can't reproduce this in the Clippy tests, currently researching
This is a false-positive that get's triggered when adding a message to debug_assert
.