Skip to content

FP: eq_op: fires for different cfg!() args #5077

@matthiaskrgr

Description

@matthiaskrgr
warning: equal expressions as operands to `&&`
   --> src/libtest/lib.rs:468:32
    |
468 |         let supports_threads = !cfg!(target_os = "emscripten") && !cfg!(target_arch = "wasm32");
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |

I guess clippy only sees something like false && false after preprocessing which looks FP-iy, the lint should probably not fire here.

clippy 0.0.212 (fd0428f 2020-01-19)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions