Allowing clippy::arithmetic
in const contexts
#9307
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
Description
The new
clippy::arithmetic
lint always lints against usage of arithmetic operators. Would it be feasible to not lint in const contexts? The reasoning for the lint is the overflow/panic behavior, there are a lot of scenarios which could be statically checked.For instance:
Would it be feasible to disallow arithmetic only in scenarios which may actually overflow/panic?
Version
Additional Labels
@rustbot label +C-enhancement
The text was updated successfully, but these errors were encountered: