summaryrefslogtreecommitdiffstats
path: root/tests/ui/check-cfg/unexpected-cfg-value.rs
blob: a84458071de84afd38d6bb2f4dd1a3248cd0ba65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Check warning for invalid configuration value in the code and
// in the cli
//
// check-pass
// revisions: values cfg
// compile-flags: --cfg=feature="rand" -Z unstable-options
// compile-flags: --check-cfg=cfg(values,cfg)
// [values]compile-flags: --check-cfg=values(feature,"serde","full")
// [cfg]compile-flags: --check-cfg=cfg(feature,values("serde","full"))

#[cfg(feature = "sedre")]
//~^ WARNING unexpected `cfg` condition value
pub fn f() {}

#[cfg(feature = "serde")]
pub fn g() {}

#[cfg(feature = "rand")]
//~^ WARNING unexpected `cfg` condition value
pub fn h() {}

pub fn main() {}