Skip to content

Commit 779b866

Browse files
fix temporary value dropped while borrowed
1 parent dc37389 commit 779b866

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
@@ -281,8 +281,8 @@ impl TestDB {
281281
let editioned_file_id_wrapper =
282282
base_db::EditionedFileId::new(db.as_dyn_database(), position.file_id);
283283

284-
let root = db.parse(editioned_file_id_wrapper);
285-
let scope_iter = algo::ancestors_at_offset(&root.syntax_node(), position.offset)
284+
let root_syntax_node = db.parse(editioned_file_id_wrapper).syntax_node();
285+
let scope_iter = algo::ancestors_at_offset(&root_syntax_node, position.offset)
286286
.filter_map(|node| {
287287
let block = ast::BlockExpr::cast(node)?;
288288
let expr = ast::Expr::from(block);

0 commit comments

Comments
 (0)