diff options
Diffstat (limited to 'crates/ra_ide_api/src/display')
-rw-r--r-- | crates/ra_ide_api/src/display/function_signature.rs | 7 | ||||
-rw-r--r-- | crates/ra_ide_api/src/display/navigation_target.rs | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/display/function_signature.rs b/crates/ra_ide_api/src/display/function_signature.rs index d0c155de7..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)] |
diff --git a/crates/ra_ide_api/src/display/navigation_target.rs b/crates/ra_ide_api/src/display/navigation_target.rs index d7687e1a4..1e9cdaff4 100644 --- a/crates/ra_ide_api/src/display/navigation_target.rs +++ b/crates/ra_ide_api/src/display/navigation_target.rs | |||
@@ -5,7 +5,7 @@ use ra_syntax::{ | |||
5 | ast::{self, DocCommentsOwner}, | 5 | ast::{self, DocCommentsOwner}, |
6 | algo::visit::{visitor, Visitor}, | 6 | algo::visit::{visitor, Visitor}, |
7 | }; | 7 | }; |
8 | use hir::{ModuleSource, FieldSource, ImplItem}; | 8 | use hir::{ModuleSource, FieldSource, ImplItem, HasSource}; |
9 | 9 | ||
10 | use crate::{FileSymbol, db::RootDatabase}; | 10 | use crate::{FileSymbol, db::RootDatabase}; |
11 | use super::short_label::ShortLabel; | 11 | use super::short_label::ShortLabel; |
@@ -182,7 +182,7 @@ impl NavigationTarget { | |||
182 | 182 | ||
183 | pub(crate) fn from_def_source<A, D>(db: &RootDatabase, def: D) -> NavigationTarget | 183 | pub(crate) fn from_def_source<A, D>(db: &RootDatabase, def: D) -> NavigationTarget |
184 | where | 184 | where |
185 | D: hir::HasSource<Ast = TreeArc<A>>, | 185 | D: HasSource<Ast = TreeArc<A>>, |
186 | A: ast::DocCommentsOwner + ast::NameOwner + ShortLabel, | 186 | A: ast::DocCommentsOwner + ast::NameOwner + ShortLabel, |
187 | { | 187 | { |
188 | let src = def.source(db); | 188 | let src = def.source(db); |