Add way to express no-values with check-cfg
This commit is contained in:
parent
284cb714d2
commit
41b69aae91
10 changed files with 89 additions and 32 deletions
|
@ -218,7 +218,9 @@ pub(crate) fn parse_check_cfg(dcx: &DiagCtxt, specs: Vec<String>) -> CheckCfg {
|
|||
}
|
||||
}
|
||||
|
||||
if values.is_empty() && !values_any_specified && !any_specified {
|
||||
if !values_specified && !any_specified {
|
||||
// `cfg(name)` is equivalent to `cfg(name, values(none()))` so add
|
||||
// an implicit `none()`
|
||||
values.insert(None);
|
||||
} else if !values.is_empty() && values_any_specified {
|
||||
error!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue