rust-clippy/clippy_lints/src/utils
bors cc1998f7b3 Auto merge of #6077 - ebroto:revert_or_fun_call_const, r=matthiaskrgr
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
2020-09-24 14:14:53 +00:00
..
ast_utils.rs Auto merge of #75800 - Aaron1011:feature/full-nt-tokens, r=petrochenkov 2020-09-11 02:35:01 +00:00
attrs.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
author.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
camel_case.rs new lints around #[must_use] fns 2019-10-14 12:09:04 +02:00
comparisons.rs Rustup to rust-lang/rust#67886 2020-01-07 01:46:33 +09:00
conf.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
constants.rs Remove all copyright license headers 2019-01-08 21:46:39 +01:00
diagnostics.rs Misc doc updates 2020-09-15 10:29:53 +02:00
eager_or_lazy.rs option_if_let_else - distinguish pure from impure else expressions 2020-09-16 01:30:50 +02:00
higher.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
hir_utils.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
inspector.rs clippy: support QPath::LangItem 2020-08-17 13:55:05 +01:00
internal_lints.rs replace walk_ptrs_ty with peel_refs 2020-09-17 10:11:59 +12:00
mod.rs Revert "Avoid or_fun_call for const_fn with no args" 2020-09-23 00:39:00 +02:00
numeric_literal.rs Merge commit 'da5a6fb1b65ec6581a67e942a3850f6bc15a552c' into clippyup 2020-07-26 21:07:07 +02:00
paths.rs Auto merge of #6044 - rschoon:rc-buffer, r=yaahc 2020-09-23 18:35:08 +00:00
ptr.rs Use 'tcx for references to AccessLevels wherever possible. 2020-07-03 00:04:48 +03:00
sugg.rs option_if_let_else - distinguish pure from impure else expressions 2020-09-16 01:30:50 +02:00
sym.rs Rustup to https://github.com/rust-lang/rust/pull/67853 2020-01-04 11:30:03 +01:00
usage.rs option_if_let_else - distinguish pure from impure else expressions 2020-09-16 01:30:50 +02:00