RS.CLIPPY.NON_MINIMAL_CFG

Ensure that all `cfg(any())` and `cfg(all())` have more than one condition

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: non_minimal_cfg. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for any and all combinators in cfg with only one condition.

Why is this bad?

If there is only one condition, no need to wrap it into any or all combinators.

Example

#[cfg(any(unix))]
pub struct Bar;

Use instead:

#[cfg(unix)]
pub struct Bar;