diff options
| author | bors <bors@rust-lang.org> | 2020-09-24 14:14:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-24 14:14:53 +0000 |
| commit | cc1998f7b3cc04c891f92c62a52c0c45fa4c145a (patch) | |
| tree | 0c1503c0fd28371468a158fa8510f5ddb1fffc74 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs | |
| parent | 019c0d5f7f90f959ff92684a04b0d766b22527a5 (diff) | |
| parent | ce83d8d4d1b28e73888a616d3ffbf19c6a620588 (diff) | |
| download | rust-cc1998f7b3cc04c891f92c62a52c0c45fa4c145a.tar.gz rust-cc1998f7b3cc04c891f92c62a52c0c45fa4c145a.zip | |
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
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs')
0 files changed, 0 insertions, 0 deletions
