Skip to content

Commit 688c982

Browse files
fix temporary value dropped while borrowed
1 parent 3684b17 commit 688c982

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/hir-def/src/test_db.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ impl TestDB {
273273
let editioned_file_id_wrapper =
274274
base_db::EditionedFileId::new(db.as_dyn_database(), position.file_id);
275275

276-
let root = db.parse(editioned_file_id_wrapper);
277-
let scope_iter = algo::ancestors_at_offset(&root.syntax_node(), position.offset)
276+
let root_syntax_node = db.parse(editioned_file_id_wrapper).syntax_node();
277+
let scope_iter = algo::ancestors_at_offset(&root_syntax_node, position.offset)
278278
.filter_map(|node| {
279279
let block = ast::BlockExpr::cast(node)?;
280280
let expr = ast::Expr::from(block);

0 commit comments

Comments
 (0)