]> git.lizzy.rs Git - rust.git/commit
Auto merge of #5889 - ebroto:5886_or_fun_call_const_0_args, r=Manishearth
authorbors <bors@rust-lang.org>
Mon, 10 Aug 2020 22:12:38 +0000 (22:12 +0000)
committerbors <bors@rust-lang.org>
Mon, 10 Aug 2020 22:12:38 +0000 (22:12 +0000)
commit16831891da49422e08c597a3857c2091ca220cbc
tree04c4f1120412dfeaffa6b5e21dc4fd62566d39de
parent41134532023a8e5bbbe621f2538e61049ceafe6b
parent5d66bd7bb3fd701d70ec11217e3f89fabe5cb0a7
Auto merge of #5889 - ebroto:5886_or_fun_call_const_0_args, r=Manishearth

Avoid or_fun_call for const_fn with no args

Based on #5682 by @lzutao

This avoids a subset of false positives, specifically those related to `const fn`s that take no arguments.
For the rest, a much more involved fix would be needed, see https://github.com/rust-lang/rust-clippy/pull/5682#issuecomment-638681210.

So this does *not* solve #5658

changelog: Avoid triggering [`or_fun_call`] with `const fn`s that take no arguments.

Fixes #5886