From edbc18516d211c8dbf07539358c7d8aeca24bb30 Mon Sep 17 00:00:00 2001 From: pcpthm Date: Fri, 22 Mar 2019 04:33:05 +0900 Subject: Fix reparsing bug on "{}{}" --- crates/ra_syntax/src/parsing/reparsing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_syntax/src') diff --git a/crates/ra_syntax/src/parsing/reparsing.rs b/crates/ra_syntax/src/parsing/reparsing.rs index 3b5471bf8..d54669a95 100644 --- a/crates/ra_syntax/src/parsing/reparsing.rs +++ b/crates/ra_syntax/src/parsing/reparsing.rs @@ -111,7 +111,7 @@ fn is_balanced(tokens: &[Token]) -> bool { return false; } let mut balance = 0usize; - for t in tokens.iter() { + for t in &tokens[1..tokens.len() - 1] { match t.kind { L_CURLY => balance += 1, R_CURLY => { -- cgit v1.2.3