aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/hir/function/imp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/hir/function/imp.rs')
-rw-r--r--crates/ra_analysis/src/hir/function/imp.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_analysis/src/hir/function/imp.rs b/crates/ra_analysis/src/hir/function/imp.rs
index cd573a47f..0d487d024 100644
--- a/crates/ra_analysis/src/hir/function/imp.rs
+++ b/crates/ra_analysis/src/hir/function/imp.rs
@@ -4,17 +4,17 @@ use ra_syntax::ast::{AstNode, FnDef, FnDefNode};
4 4
5use crate::hir::{ 5use crate::hir::{
6 function::{FnId, FnScopes}, 6 function::{FnId, FnScopes},
7 DescriptorDatabase, 7 HirDatabase,
8}; 8};
9 9
10/// Resolve `FnId` to the corresponding `SyntaxNode` 10/// Resolve `FnId` to the corresponding `SyntaxNode`
11pub(crate) fn fn_syntax(db: &impl DescriptorDatabase, fn_id: FnId) -> FnDefNode { 11pub(crate) fn fn_syntax(db: &impl HirDatabase, fn_id: FnId) -> FnDefNode {
12 let ptr = db.id_maps().fn_ptr(fn_id); 12 let ptr = db.id_maps().fn_ptr(fn_id);
13 let syntax = db.resolve_syntax_ptr(ptr); 13 let syntax = db.resolve_syntax_ptr(ptr);
14 FnDef::cast(syntax.borrowed()).unwrap().owned() 14 FnDef::cast(syntax.borrowed()).unwrap().owned()
15} 15}
16 16
17pub(crate) fn fn_scopes(db: &impl DescriptorDatabase, fn_id: FnId) -> Arc<FnScopes> { 17pub(crate) fn fn_scopes(db: &impl HirDatabase, fn_id: FnId) -> Arc<FnScopes> {
18 let syntax = db._fn_syntax(fn_id); 18 let syntax = db._fn_syntax(fn_id);
19 let res = FnScopes::new(syntax.borrowed()); 19 let res = FnScopes::new(syntax.borrowed());
20 Arc::new(res) 20 Arc::new(res)