aboutsummaryrefslogtreecommitdiff
path: root/src/parser/grammar/items
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-02-09 19:56:18 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-02-09 19:56:18 +0000
commit419b9b7e5efd895249934551cb2588b27a956f58 (patch)
tree4d53f6d5e34a4244f0aaeb2039454e3594856324 /src/parser/grammar/items
parent550b17d7cf321c2aebff75d00b1654b55beca53c (diff)
parentac932df22a993f0b287e60aa42055405ef94a6ae (diff)
Merge #44
44: Drop ErrorBuilder nonsense r=matklad a=matklad
Diffstat (limited to 'src/parser/grammar/items')
-rw-r--r--src/parser/grammar/items/mod.rs8
-rw-r--r--src/parser/grammar/items/structs.rs4
-rw-r--r--src/parser/grammar/items/use_item.rs2
3 files changed, 7 insertions, 7 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) {
diff --git a/src/parser/grammar/items/structs.rs b/src/parser/grammar/items/structs.rs
index 69d95c698..640b940e4 100644
--- a/src/parser/grammar/items/structs.rs
+++ b/src/parser/grammar/items/structs.rs
@@ -19,7 +19,7 @@ pub(super) fn struct_item(p: &mut Parser) {
19 L_CURLY => named_fields(p), 19 L_CURLY => named_fields(p),
20 _ => { 20 _ => {
21 //TODO: special case `(` error message 21 //TODO: special case `(` error message
22 p.error().message("expected `;` or `{`").emit(); 22 p.error("expected `;` or `{`");
23 return; 23 return;
24 } 24 }
25 } 25 }
@@ -34,7 +34,7 @@ pub(super) fn struct_item(p: &mut Parser) {
34 p.expect(SEMI); 34 p.expect(SEMI);
35 } 35 }
36 _ => { 36 _ => {
37 p.error().message("expected `;`, `{`, or `(`").emit(); 37 p.error("expected `;`, `{`, or `(`");
38 return; 38 return;
39 } 39 }
40 } 40 }
diff --git a/src/parser/grammar/items/use_item.rs b/src/parser/grammar/items/use_item.rs
index 38e7b3f8a..a3f7f0da8 100644
--- a/src/parser/grammar/items/use_item.rs
+++ b/src/parser/grammar/items/use_item.rs
@@ -37,7 +37,7 @@ fn use_tree(p: &mut Parser) {
37 L_CURLY => nested_trees(p), 37 L_CURLY => nested_trees(p),
38 _ => { 38 _ => {
39 // is this unreachable? 39 // is this unreachable?
40 p.error().message("expected `{` or `*`").emit(); 40 p.error("expected `{` or `*`");
41 } 41 }
42 } 42 }
43 } 43 }