mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 18:43:20 +00:00
cc1998f7b3
Revert: or_fun_call should lint calls to `const fn`s with no args The changes in #5889 and #5984 were done under the incorrect assumption that a `const fn` with no args was guaranteed to be evaluated at compile time. A `const fn` is only guaranteed to be evaluated at compile time if it's inside a const context (the initializer of a `const` or a `static`). See this [zulip conversation](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Common.20misconception.3A.20.60const.20fn.60.20and.20its.20effect.20on.20codegen/near/208059113) for more details on this common misconception. Given that none of the linted methods by `or_fun_call` can be called in const contexts, the lint should make no exceptions. changelog: [`or_fun_call`] lints again calls to `const fn` with no args |
||
---|---|---|
.. | ||
ast_utils.rs | ||
attrs.rs | ||
author.rs | ||
camel_case.rs | ||
comparisons.rs | ||
conf.rs | ||
constants.rs | ||
diagnostics.rs | ||
eager_or_lazy.rs | ||
higher.rs | ||
hir_utils.rs | ||
inspector.rs | ||
internal_lints.rs | ||
mod.rs | ||
numeric_literal.rs | ||
paths.rs | ||
ptr.rs | ||
sugg.rs | ||
sym.rs | ||
usage.rs |