From c244dd10343ff96a73879c593bd9253c4073cb90 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 31 Jul 2018 12:26:19 +0300 Subject: Call expr --- src/parser/grammar/attributes.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parser/grammar/attributes.rs') diff --git a/src/parser/grammar/attributes.rs b/src/parser/grammar/attributes.rs index 7f1c0401a..c411d4d7f 100644 --- a/src/parser/grammar/attributes.rs +++ b/src/parser/grammar/attributes.rs @@ -36,7 +36,7 @@ fn meta_item(p: &mut Parser) { match p.current() { EQ => { p.bump(); - if !expressions::literal(p) { + if expressions::literal(p).is_none() { p.error("expected literal"); } } @@ -56,7 +56,7 @@ fn meta_item_arg_list(p: &mut Parser) { match p.current() { EOF | R_PAREN => break, IDENT => meta_item(p), - c => if !expressions::literal(p) { + c => if expressions::literal(p).is_none() { let message = "expected attribute"; if items::ITEM_FIRST.contains(c) { -- cgit v1.2.3