manual_clamp suggests using clamp() in a const function #10474
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
I'm manually reimplementing
clamp()
because the built-in version is notconst
. Themanual_clamp
rule notifies me about this.It would be nice if it could recognize that i'm
const
and therefore the suggestion is not applicable.Lint Name
manual_clamp
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
no warning
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: