summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/cfg_features.fixed
blob: 3d52f2382ea7223b406a961d7a8c0f37d60f8326 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![warn(clippy::maybe_misused_cfg)]

fn main() {
    #[cfg(feature = "not-really-a-feature")]
    //~^ ERROR: feature may misspelled as features
    //~| NOTE: `-D clippy::maybe-misused-cfg` implied by `-D warnings`
    let _ = 1 + 2;

    #[cfg(all(feature = "right", feature = "wrong"))]
    //~^ ERROR: feature may misspelled as features
    let _ = 1 + 2;

    #[cfg(all(feature = "wrong1", any(feature = "right", feature = "wrong2", feature, features)))]
    //~^ ERROR: feature may misspelled as features
    //~| ERROR: feature may misspelled as features
    let _ = 1 + 2;
}