diff options
Diffstat (limited to 'crates/hir_def')
-rw-r--r-- | crates/hir_def/src/body/lower.rs | 2 | ||||
-rw-r--r-- | crates/hir_def/src/data.rs | 2 | ||||
-rw-r--r-- | crates/hir_def/src/test_db.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs index 28b11cdde..c18001e15 100644 --- a/crates/hir_def/src/body/lower.rs +++ b/crates/hir_def/src/body/lower.rs | |||
@@ -712,7 +712,7 @@ impl ExprCollector<'_> { | |||
712 | let statements = | 712 | let statements = |
713 | block.statements().filter_map(|s| self.collect_stmt(s)).flatten().collect(); | 713 | block.statements().filter_map(|s| self.collect_stmt(s)).flatten().collect(); |
714 | let tail = block.tail_expr().map(|e| self.collect_expr(e)); | 714 | let tail = block.tail_expr().map(|e| self.collect_expr(e)); |
715 | let syntax_node_ptr = AstPtr::new(&block.clone().into()); | 715 | let syntax_node_ptr = AstPtr::new(&block.into()); |
716 | let expr_id = self.alloc_expr( | 716 | let expr_id = self.alloc_expr( |
717 | Expr::Block { id: block_id, statements, tail, label: None }, | 717 | Expr::Block { id: block_id, statements, tail, label: None }, |
718 | syntax_node_ptr, | 718 | syntax_node_ptr, |
diff --git a/crates/hir_def/src/data.rs b/crates/hir_def/src/data.rs index 42fcca386..d3380e0f4 100644 --- a/crates/hir_def/src/data.rs +++ b/crates/hir_def/src/data.rs | |||
@@ -43,7 +43,7 @@ impl FunctionData { | |||
43 | name: func.name.clone(), | 43 | name: func.name.clone(), |
44 | params: func.params.iter().map(|id| item_tree[*id].clone()).collect(), | 44 | params: func.params.iter().map(|id| item_tree[*id].clone()).collect(), |
45 | ret_type: item_tree[func.ret_type].clone(), | 45 | ret_type: item_tree[func.ret_type].clone(), |
46 | attrs: item_tree.attrs(db, krate, ModItem::from(loc.id.value).into()).clone(), | 46 | attrs: item_tree.attrs(db, krate, ModItem::from(loc.id.value).into()), |
47 | has_self_param: func.has_self_param, | 47 | has_self_param: func.has_self_param, |
48 | has_body: func.has_body, | 48 | has_body: func.has_body, |
49 | is_unsafe: func.is_unsafe, | 49 | is_unsafe: func.is_unsafe, |
diff --git a/crates/hir_def/src/test_db.rs b/crates/hir_def/src/test_db.rs index c4e36eda5..6665d902d 100644 --- a/crates/hir_def/src/test_db.rs +++ b/crates/hir_def/src/test_db.rs | |||
@@ -161,7 +161,7 @@ impl TestDB { | |||
161 | let node = src.map(|ptr| ptr.to_node(&root)); | 161 | let node = src.map(|ptr| ptr.to_node(&root)); |
162 | let frange = node.as_ref().original_file_range(db); | 162 | let frange = node.as_ref().original_file_range(db); |
163 | 163 | ||
164 | let message = d.message().to_owned(); | 164 | let message = d.message(); |
165 | actual.entry(frange.file_id).or_default().push((frange.range, message)); | 165 | actual.entry(frange.file_id).or_default().push((frange.range, message)); |
166 | }); | 166 | }); |
167 | 167 | ||