mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
fix hir for new block syntax
This commit is contained in:
parent
dcf8e89503
commit
5e3f291195
14 changed files with 72 additions and 57 deletions
|
@ -123,7 +123,7 @@ fn has_comma_after(node: &SyntaxNode) -> bool {
|
|||
fn join_single_expr_block(edit: &mut TextEditBuilder, token: &SyntaxToken) -> Option<()> {
|
||||
let block = ast::Block::cast(token.parent())?;
|
||||
let block_expr = ast::BlockExpr::cast(block.syntax().parent()?)?;
|
||||
let expr = extract_trivial_expression(&block)?;
|
||||
let expr = extract_trivial_expression(&block_expr)?;
|
||||
|
||||
let block_range = block_expr.syntax().text_range();
|
||||
let mut buf = expr.syntax().text().to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue