aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/descriptors/function
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/descriptors/function')
-rw-r--r--crates/ra_analysis/src/descriptors/function/imp.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/descriptors/function/imp.rs b/crates/ra_analysis/src/descriptors/function/imp.rs
index 755e05819..a989a04cd 100644
--- a/crates/ra_analysis/src/descriptors/function/imp.rs
+++ b/crates/ra_analysis/src/descriptors/function/imp.rs
@@ -11,11 +11,11 @@ use crate::descriptors::{
11/// TODO: this should return something more type-safe then `SyntaxNode` 11/// TODO: this should return something more type-safe then `SyntaxNode`
12pub(crate) fn fn_syntax(db: &impl DescriptorDatabase, fn_id: FnId) -> FnDefNode { 12pub(crate) fn fn_syntax(db: &impl DescriptorDatabase, fn_id: FnId) -> FnDefNode {
13 let syntax = db.resolve_syntax_ptr(fn_id.0); 13 let syntax = db.resolve_syntax_ptr(fn_id.0);
14 FnDef::cast(syntax.borrowed()).unwrap().into() 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 DescriptorDatabase, 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.ast()); 19 let res = FnScopes::new(syntax.borrowed());
20 Arc::new(res) 20 Arc::new(res)
21} 21}