Implement boolean lit support in cfg predicates
This commit is contained in:
parent
57b9b1f974
commit
c99f29b29f
6 changed files with 48 additions and 6 deletions
|
@ -466,9 +466,9 @@ pub fn parse_cfg<'a>(meta_item: &'a MetaItem, sess: &Session) -> Option<&'a Nest
|
|||
sess.dcx().emit_err(InvalidCfg::MultiplePredicates { span: l.span() });
|
||||
None
|
||||
}
|
||||
Some([single]) => match single.is_meta_item() {
|
||||
true => Some(single),
|
||||
false => {
|
||||
Some([single]) => match single.meta_item_or_bool() {
|
||||
Some(meta_item) => Some(meta_item),
|
||||
None => {
|
||||
sess.dcx().emit_err(InvalidCfg::PredicateLiteral { span: single.span() });
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue