aboutsummaryrefslogtreecommitdiff
path: root/crates/parser/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-25 16:23:16 +0100
committerGitHub <[email protected]>2020-08-25 16:23:16 +0100
commit32be2d60af7c5c4706dc4ad4957056032d569643 (patch)
treec9a8da95da29f52b35e7f06171a34ecaeb9b8cfa /crates/parser/src
parentad7e7d6b8ed5e08f8183320ece5a6c812fe35a57 (diff)
parent18b667cfcb31b2c5e421d12a34b34e83165603f4 (diff)
Merge #5877
5877: Complete `pub` in fields r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/parser/src')
-rw-r--r--crates/parser/src/grammar/types.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/parser/src/grammar/types.rs b/crates/parser/src/grammar/types.rs
index c876545f4..9d00eb9b9 100644
--- a/crates/parser/src/grammar/types.rs
+++ b/crates/parser/src/grammar/types.rs
@@ -18,7 +18,14 @@ pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(token_set![
18 T![dyn], 18 T![dyn],
19]); 19]);
20 20
21const TYPE_RECOVERY_SET: TokenSet = token_set![R_PAREN, COMMA, L_DOLLAR]; 21const TYPE_RECOVERY_SET: TokenSet = token_set![
22 T![')'],
23 T![,],
24 L_DOLLAR,
25 // test_err struct_field_recover
26 // struct S { f pub g: () }
27 T![pub],
28];
22 29
23pub(crate) fn type_(p: &mut Parser) { 30pub(crate) fn type_(p: &mut Parser) {
24 type_with_bounds_cond(p, true); 31 type_with_bounds_cond(p, true);