Open
Description
Description
I propose to move these lints from restriction
into a new allow-by-default category panics
. This category contains lints that are related to preventing panics somehow:
expect_used
unwrap_used
panic
unreachable
unimplemented
todo
indexing_slicing
Projects that wish to minimize the amount of panics from their codebase have to enable each of the above lints. It would be simpler for them to instead just configure the panic
category:
[lints.clippy]
panics = "deny"
Note: Why call it panics
and not panic
:
- Clippy already has a
panic
lint so it will clash - Projects that have
panic = "deny"
will experience all of the above lints being auto-enabled for them when they migrate to a clippy version that has this change
Additional Labels
@rustbot label +C-enhancement