diff options
author | Aleksey Kladov <[email protected]> | 2019-09-02 19:23:19 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-09-02 19:23:19 +0100 |
commit | 5e3f291195b580580be7ce5622f54ebca75fb9f0 (patch) | |
tree | 772693eb44bde1fac1b9292456e1fa6e056bdb1f /crates/ra_ide_api | |
parent | dcf8e895038a7677711b8168ee12e1d47f6018bc (diff) |
fix hir for new block syntax
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/join_lines.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/join_lines.rs b/crates/ra_ide_api/src/join_lines.rs index a2e4b6f3c..a71e4ed7d 100644 --- a/crates/ra_ide_api/src/join_lines.rs +++ b/crates/ra_ide_api/src/join_lines.rs | |||
@@ -123,7 +123,7 @@ fn has_comma_after(node: &SyntaxNode) -> bool { | |||
123 | fn join_single_expr_block(edit: &mut TextEditBuilder, token: &SyntaxToken) -> Option<()> { | 123 | fn join_single_expr_block(edit: &mut TextEditBuilder, token: &SyntaxToken) -> Option<()> { |
124 | let block = ast::Block::cast(token.parent())?; | 124 | let block = ast::Block::cast(token.parent())?; |
125 | let block_expr = ast::BlockExpr::cast(block.syntax().parent()?)?; | 125 | let block_expr = ast::BlockExpr::cast(block.syntax().parent()?)?; |
126 | let expr = extract_trivial_expression(&block)?; | 126 | let expr = extract_trivial_expression(&block_expr)?; |
127 | 127 | ||
128 | let block_range = block_expr.syntax().text_range(); | 128 | let block_range = block_expr.syntax().text_range(); |
129 | let mut buf = expr.syntax().text().to_string(); | 129 | let mut buf = expr.syntax().text().to_string(); |