Skip to content

Suggest using cfg_if crate for chains of cfg(A) and cfg(not(A)) #1894

@clarfonthey

Description

@clarfonthey

This crate has been extremely useful for me and it would be helpful for clippy to notice these and suggest using the crate instead.

Activity

briansmith

briansmith commented on Oct 16, 2020

@briansmith

Unfortunately cfg_if is problematic in some cases. I had to remove all use s of cfg_if out of a project recently because of rust-lang/rustfmt#3253. I actually am planning to have my CI/CD prevent use of cfg_if.

nk9

nk9 commented on Aug 3, 2025

@nk9

The project has decided not to suggest third-party crates. So this can be closed.

@rustbot label S-triage

added
S-triageStatus: PR was triaged and is waiting for an action from a maintainer (closing/moving/... the PR)
on Aug 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-triageStatus: PR was triaged and is waiting for an action from a maintainer (closing/moving/... the PR)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @briansmith@samueltardieu@nk9@clarfonthey@rustbot

        Issue actions

          Suggest using cfg_if crate for chains of cfg(A) and cfg(not(A)) · Issue #1894 · rust-lang/rust-clippy