diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-08 11:51:46 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-08 11:51:46 +0100 |
commit | 9aa3bca53626a76657ecf5f59c431dcd3f7a8085 (patch) | |
tree | 85b7729d3c8edbae11faad34f3d4a0d41749de18 /crates/ra_parser/src | |
parent | 9e3c8438475308bffaced3d9842299676037d036 (diff) | |
parent | 53d05448c1d44b3ac2a46d54b40c3f2653fa0312 (diff) |
Merge #3892
3892: Add L_DOLLAR for TYPE_RECOVERY_SET r=matklad a=edwin0cheng
This PR is a hot fix for issue #3861 that just prevent it make the parser being stuck.
The actual problem described in https://github.com/rust-analyzer/rust-analyzer/pull/3873#issuecomment-610208693 is a very deep rabbit hole I don't want to dig right now :(
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r-- | crates/ra_parser/src/grammar/types.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/types.rs b/crates/ra_parser/src/grammar/types.rs index 2c00bce80..386969d2d 100644 --- a/crates/ra_parser/src/grammar/types.rs +++ b/crates/ra_parser/src/grammar/types.rs | |||
@@ -7,7 +7,7 @@ pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(token_set![ | |||
7 | DYN_KW, L_ANGLE, | 7 | DYN_KW, L_ANGLE, |
8 | ]); | 8 | ]); |
9 | 9 | ||
10 | const TYPE_RECOVERY_SET: TokenSet = token_set![R_PAREN, COMMA]; | 10 | const TYPE_RECOVERY_SET: TokenSet = token_set![R_PAREN, COMMA, L_DOLLAR]; |
11 | 11 | ||
12 | pub(crate) fn type_(p: &mut Parser) { | 12 | pub(crate) fn type_(p: &mut Parser) { |
13 | type_with_bounds_cond(p, true); | 13 | type_with_bounds_cond(p, true); |