diff options
Diffstat (limited to 'src/parser/grammar/items/mod.rs')
-rw-r--r-- | src/parser/grammar/items/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser/grammar/items/mod.rs b/src/parser/grammar/items/mod.rs index 37f2ab132..b73628ec0 100644 --- a/src/parser/grammar/items/mod.rs +++ b/src/parser/grammar/items/mod.rs | |||
@@ -51,7 +51,7 @@ fn item(p: &mut Parser) { | |||
51 | // extern struct Foo; | 51 | // extern struct Foo; |
52 | _ => { | 52 | _ => { |
53 | item.abandon(p); | 53 | item.abandon(p); |
54 | p.error().message("expected `fn` or `{`").emit(); | 54 | p.error("expected `fn` or `{`"); |
55 | return; | 55 | return; |
56 | } | 56 | } |
57 | } | 57 | } |
@@ -121,7 +121,7 @@ fn item(p: &mut Parser) { | |||
121 | abi(p); | 121 | abi(p); |
122 | if !p.at(FN_KW) { | 122 | if !p.at(FN_KW) { |
123 | item.abandon(p); | 123 | item.abandon(p); |
124 | p.error().message("expected function").emit(); | 124 | p.error("expected function"); |
125 | return; | 125 | return; |
126 | } | 126 | } |
127 | fn_item(p); | 127 | fn_item(p); |
@@ -144,7 +144,7 @@ fn item(p: &mut Parser) { | |||
144 | if t == L_CURLY { | 144 | if t == L_CURLY { |
145 | error_block(p, message); | 145 | error_block(p, message); |
146 | } else { | 146 | } else { |
147 | p.error().message(message).emit(); | 147 | p.error(message); |
148 | } | 148 | } |
149 | return; | 149 | return; |
150 | } | 150 | } |
@@ -234,7 +234,7 @@ fn fn_item(p: &mut Parser) { | |||
234 | if p.at(L_PAREN) { | 234 | if p.at(L_PAREN) { |
235 | fn_value_parameters(p); | 235 | fn_value_parameters(p); |
236 | } else { | 236 | } else { |
237 | p.error().message("expected function arguments").emit(); | 237 | p.error("expected function arguments"); |
238 | } | 238 | } |
239 | 239 | ||
240 | if p.at(L_CURLY) { | 240 | if p.at(L_CURLY) { |