rust-clippy
rust-clippy copied to clipboard
New lint category: `panics`
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_usedunwrap_usedpanicunreachableunimplementedtodoindexing_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
paniclint 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