aboutsummaryrefslogtreecommitdiff
path: root/src/parser/grammar/attributes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/grammar/attributes.rs')
-rw-r--r--src/parser/grammar/attributes.rs4
1 files changed, 2 insertions, 2 deletions
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) {
36 match p.current() { 36 match p.current() {
37 EQ => { 37 EQ => {
38 p.bump(); 38 p.bump();
39 if !expressions::literal(p) { 39 if expressions::literal(p).is_none() {
40 p.error("expected literal"); 40 p.error("expected literal");
41 } 41 }
42 } 42 }
@@ -56,7 +56,7 @@ fn meta_item_arg_list(p: &mut Parser) {
56 match p.current() { 56 match p.current() {
57 EOF | R_PAREN => break, 57 EOF | R_PAREN => break,
58 IDENT => meta_item(p), 58 IDENT => meta_item(p),
59 c => if !expressions::literal(p) { 59 c => if expressions::literal(p).is_none() {
60 let message = "expected attribute"; 60 let message = "expected attribute";
61 61
62 if items::ITEM_FIRST.contains(c) { 62 if items::ITEM_FIRST.contains(c) {