[False Positive] Regarding adding const to a function that can't be const #14658
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
If I have this little Rust program (probably it's not minimized, but it's short enough):
Clippy gives me this warning:
But if I add const to pow_mod, the rustc compiler (1.88.0-nightly 2025-04-19) gives me:
(I have other examples of false positives of clippy::missing_const_for_fn).
Lint Name
No response
Reproducer
I tried this code:
<code>
I saw this happen:
I expected to see this happen:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: