File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ //@ check-pass
2+
3+ #![ feature( cfg_select) ]
4+ #![ crate_type = "lib" ]
5+
6+ cfg_select ! {
7+ true => { }
8+ invalid_cfg1 => { }
9+ //~^ WARN unexpected `cfg` condition name
10+ _ => { }
11+ }
12+
13+ cfg_select ! {
14+ invalid_cfg2 => { }
15+ //~^ WARN unexpected `cfg` condition name
16+ true => { }
17+ _ => { }
18+ }
Original file line number Diff line number Diff line change 1+ warning: unexpected `cfg` condition name: `invalid_cfg1`
2+ --> $DIR/cfg-select.rs:8:5
3+ |
4+ LL | invalid_cfg1 => {}
5+ | ^^^^^^^^^^^^
6+ |
7+ = help: expected names are: `FALSE` and `test` and 31 more
8+ = help: to expect this configuration use `--check-cfg=cfg(invalid_cfg1)`
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+
12+ warning: unexpected `cfg` condition name: `invalid_cfg2`
13+ --> $DIR/cfg-select.rs:14:5
14+ |
15+ LL | invalid_cfg2 => {}
16+ | ^^^^^^^^^^^^
17+ |
18+ = help: to expect this configuration use `--check-cfg=cfg(invalid_cfg2)`
19+ = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
20+
21+ warning: 2 warnings emitted
22+
You can’t perform that action at this time.
0 commit comments