diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-16 14:44:24 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-16 14:44:24 +0100 |
commit | 1216878f7be20dd0e652fb8cdc395009fdcfae07 (patch) | |
tree | 6551967cc8c6e921b66071453ad7888a9121d326 /crates/ra_syntax/src/parser_api.rs | |
parent | 39cb6c6d3f78b193f5873c3492e530bbd24d5dd2 (diff) | |
parent | 61f3a438d3a729a6be941bca1ff4c6a97a33f221 (diff) |
Merge #134
134: Cargo Format run r=kjeremy a=kjeremy
I'm not sure how appreciated this is but I figured I would run `cargo fmt` and see what came up.
I made sure that `cargo test` still passes.
Co-authored-by: Jeremy A. Kolb <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/parser_api.rs')
-rw-r--r-- | crates/ra_syntax/src/parser_api.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ra_syntax/src/parser_api.rs b/crates/ra_syntax/src/parser_api.rs index cc23bb75e..42046d36f 100644 --- a/crates/ra_syntax/src/parser_api.rs +++ b/crates/ra_syntax/src/parser_api.rs | |||
@@ -1,8 +1,8 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | token_set::TokenSet, | 2 | drop_bomb::DropBomb, |
3 | parser_impl::ParserImpl, | 3 | parser_impl::ParserImpl, |
4 | token_set::TokenSet, | ||
4 | SyntaxKind::{self, ERROR}, | 5 | SyntaxKind::{self, ERROR}, |
5 | drop_bomb::DropBomb, | ||
6 | }; | 6 | }; |
7 | 7 | ||
8 | /// `Parser` struct provides the low-level API for | 8 | /// `Parser` struct provides the low-level API for |
@@ -116,9 +116,7 @@ impl<'t> Parser<'t> { | |||
116 | 116 | ||
117 | /// Create an error node and consume the next token. | 117 | /// Create an error node and consume the next token. |
118 | pub(crate) fn err_recover(&mut self, message: &str, recovery: TokenSet) { | 118 | pub(crate) fn err_recover(&mut self, message: &str, recovery: TokenSet) { |
119 | if self.at(SyntaxKind::L_CURLY) | 119 | if self.at(SyntaxKind::L_CURLY) || self.at(SyntaxKind::R_CURLY) || self.at_ts(recovery) { |
120 | || self.at(SyntaxKind::R_CURLY) | ||
121 | || self.at_ts(recovery) { | ||
122 | self.error(message); | 120 | self.error(message); |
123 | } else { | 121 | } else { |
124 | let m = self.start(); | 122 | let m = self.start(); |