summaryrefslogtreecommitdiffstats
path: root/tests/ui/check-cfg/diagnotics.rs
blob: 49e127d079a79ef72cb41701beae76905c45bb2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// check-pass
// compile-flags: --check-cfg=names() --check-cfg=values(feature,"foo") --check-cfg=values(no_values) -Z unstable-options

#[cfg(featur)]
//~^ WARNING unexpected `cfg` condition name
fn feature() {}

#[cfg(featur = "foo")]
//~^ WARNING unexpected `cfg` condition name
fn feature() {}

#[cfg(featur = "fo")]
//~^ WARNING unexpected `cfg` condition name
fn feature() {}

#[cfg(feature = "foo")]
fn feature() {}

#[cfg(no_value)]
//~^ WARNING unexpected `cfg` condition name
fn no_values() {}

#[cfg(no_value = "foo")]
//~^ WARNING unexpected `cfg` condition name
fn no_values() {}

#[cfg(no_values = "bar")]
//~^ WARNING unexpected `cfg` condition value
fn no_values() {}

fn main() {}