]> git.lizzy.rs Git - rust.git/blob - src/test/ui/check-cfg/allow-macro-cfg.rs
Rollup merge of #106043 - c410-f3r:moar-errors, r=petrochenkov
[rust.git] / src / test / ui / check-cfg / allow-macro-cfg.rs
1 // This test check that local #[allow(unexpected_cfgs)] works
2 //
3 // check-pass
4 // compile-flags:--check-cfg=names() -Z unstable-options
5
6 #[allow(unexpected_cfgs)]
7 fn foo() {
8     if cfg!(FALSE) {}
9 }
10
11 fn main() {
12     #[allow(unexpected_cfgs)]
13     if cfg!(FALSE) {}
14 }