mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 02:06:57 +00:00
fix temporary value dropped while borrowed
This commit is contained in:
parent
1293a5a186
commit
65617851c5
1 changed files with 2 additions and 2 deletions
|
|
@ -281,8 +281,8 @@ impl TestDB {
|
|||
let editioned_file_id_wrapper =
|
||||
base_db::EditionedFileId::new(db.as_dyn_database(), position.file_id);
|
||||
|
||||
let root = db.parse(editioned_file_id_wrapper);
|
||||
let scope_iter = algo::ancestors_at_offset(&root.syntax_node(), position.offset)
|
||||
let root_syntax_node = db.parse(editioned_file_id_wrapper).syntax_node();
|
||||
let scope_iter = algo::ancestors_at_offset(&root_syntax_node, position.offset)
|
||||
.filter_map(|node| {
|
||||
let block = ast::BlockExpr::cast(node)?;
|
||||
let expr = ast::Expr::from(block);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue