File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ //@ check-pass
2+
3+ #[ cfg( unknown) ] //~ WARN unexpected `cfg` condition name
4+ #[ cfg( false ) ]
5+ #[ cfg( unknown) ] // Should not warn
6+ fn foo ( ) { }
7+
8+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ warning: unexpected `cfg` condition name: `unknown`
2+ --> $DIR/nested-cfg.rs:3:7
3+ |
4+ LL | #[cfg(unknown)]
5+ | ^^^^^^^
6+ |
7+ = help: expected names are: `FALSE` and `test` and 31 more
8+ = help: to expect this configuration use `--check-cfg=cfg(unknown)`
9+ = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
10+ = note: `#[warn(unexpected_cfgs)]` on by default
11+ help: found config with similar value
12+ |
13+ LL - #[cfg(unknown)]
14+ LL + #[cfg(target_os = "unknown")]
15+ |
16+ help: found config with similar value
17+ |
18+ LL - #[cfg(unknown)]
19+ LL + #[cfg(target_vendor = "unknown")]
20+ |
21+
22+ warning: 1 warning emitted
23+
You can’t perform that action at this time.
0 commit comments