diff options
Diffstat (limited to 'crates/ra_ide_api/src/display/function_signature.rs')
-rw-r--r-- | crates/ra_ide_api/src/display/function_signature.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/display/function_signature.rs b/crates/ra_ide_api/src/display/function_signature.rs index d09950bce..b0b0c7122 100644 --- a/crates/ra_ide_api/src/display/function_signature.rs +++ b/crates/ra_ide_api/src/display/function_signature.rs | |||
@@ -1,10 +1,11 @@ | |||
1 | use super::{where_predicates, generic_parameters}; | ||
2 | use crate::db; | ||
3 | use std::fmt::{self, Display}; | 1 | use std::fmt::{self, Display}; |
2 | |||
4 | use join_to_string::join; | 3 | use join_to_string::join; |
5 | use ra_syntax::ast::{self, AstNode, NameOwner, VisibilityOwner}; | 4 | use ra_syntax::ast::{self, AstNode, NameOwner, VisibilityOwner}; |
6 | use std::convert::From; | 5 | use std::convert::From; |
7 | use hir::{Docs, Documentation}; | 6 | use hir::{Docs, Documentation, HasSource}; |
7 | |||
8 | use crate::{db, display::{where_predicates, generic_parameters}}; | ||
8 | 9 | ||
9 | /// Contains information about a function signature | 10 | /// Contains information about a function signature |
10 | #[derive(Debug)] | 11 | #[derive(Debug)] |
@@ -33,7 +34,7 @@ impl FunctionSignature { | |||
33 | 34 | ||
34 | pub(crate) fn from_hir(db: &db::RootDatabase, function: hir::Function) -> Self { | 35 | pub(crate) fn from_hir(db: &db::RootDatabase, function: hir::Function) -> Self { |
35 | let doc = function.docs(db); | 36 | let doc = function.docs(db); |
36 | let (_, ast_node) = function.source(db); | 37 | let ast_node = function.source(db).ast; |
37 | FunctionSignature::from(&*ast_node).with_doc_opt(doc) | 38 | FunctionSignature::from(&*ast_node).with_doc_opt(doc) |
38 | } | 39 | } |
39 | } | 40 | } |