clippy::missing_const_for_fn triggering for tests is kind of pointless #13938
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 wrote a test to make sure I remembered to keep a type implementing
Copy
. The real type is defined by a fairly elaborate macro, so that felt like a real risk. It's meant to be a "does this compile" test. Clippy told me I should make my unit testconst fn
, which seems pointless.I suggest
clippy::missing_const_for_fn
should ignore anything#[test]
.Lint Name
clippy::missing_const_for_fn
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen: *blissful silence*
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: