mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Fix reparsing bug on "{}{}"
This commit is contained in:
parent
7669113e7c
commit
edbc18516d
2 changed files with 5 additions and 1 deletions
|
@ -111,7 +111,7 @@ fn is_balanced(tokens: &[Token]) -> bool {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let mut balance = 0usize;
|
let mut balance = 0usize;
|
||||||
for t in tokens.iter() {
|
for t in &tokens[1..tokens.len() - 1] {
|
||||||
match t.kind {
|
match t.kind {
|
||||||
L_CURLY => balance += 1,
|
L_CURLY => balance += 1,
|
||||||
R_CURLY => {
|
R_CURLY => {
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
0
|
||||||
|
0
|
||||||
|
}
|
||||||
|
{;
|
Loading…
Add table
Add a link
Reference in a new issue