Skip to content

Check cfg to catch feature typos #12091

Description

@BD103

Nightly Rust has added support for -Zcheck-cfg, which will show a warning if there is a #[cfg(...) for a nonexistant feature / cfg.

While not possible to add this to CI because it is currently nightly-only, it can be run locally to catch all current typos.

Please read this comment on how to use -Zcheck-cfg. Once you follow the setup, run:

cargo +nightly check -Zcheck-cfg --workspace

I found a few warnings related to missing features, but I currently don't have the time to work on it today.

Activity

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

    A-Build-SystemRelated to build systems or continuous integrationC-Code-QualityA section of code that is hard to understand or changeD-TrivialNice and easy! A great choice to get started with Bevy

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions