diff options
Diffstat (limited to 'tests/ui/check-cfg/unexpected-cfg-name.rs')
-rw-r--r-- | tests/ui/check-cfg/unexpected-cfg-name.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/check-cfg/unexpected-cfg-name.rs b/tests/ui/check-cfg/unexpected-cfg-name.rs new file mode 100644 index 000000000..9fc0e28a8 --- /dev/null +++ b/tests/ui/check-cfg/unexpected-cfg-name.rs @@ -0,0 +1,13 @@ +// Check warning for unexpected configuration name +// +// check-pass +// compile-flags: --check-cfg=cfg() -Z unstable-options + +#[cfg(widnows)] +//~^ WARNING unexpected `cfg` condition name +pub fn f() {} + +#[cfg(windows)] +pub fn g() {} + +pub fn main() {} |