aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs4
-rw-r--r--crates/ra_ide_api/src/db.rs1
-rw-r--r--crates/ra_ide_api/src/display/function_signature.rs4
3 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs
index 802c7701a..63e25e0bf 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide_api/src/completion/complete_path.rs
@@ -1,6 +1,6 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use hir::{Adt, Either, PathResolution}; 3use hir::{Adt, Either, HasSource, PathResolution};
4use ra_syntax::AstNode; 4use ra_syntax::AstNode;
5use test_utils::tested_by; 5use test_utils::tested_by;
6 6
@@ -27,7 +27,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
27 } 27 }
28 if Some(module) == ctx.module { 28 if Some(module) == ctx.module {
29 if let Some(import) = import { 29 if let Some(import) = import {
30 if let Either::A(use_tree) = module.import_source(ctx.db, import) { 30 if let Either::A(use_tree) = import.source(ctx.db).value {
31 if use_tree.syntax().text_range().contains_inclusive(ctx.offset) { 31 if use_tree.syntax().text_range().contains_inclusive(ctx.offset) {
32 // for `use self::foo<|>`, don't suggest `foo` as a completion 32 // for `use self::foo<|>`, don't suggest `foo` as a completion
33 tested_by!(dont_complete_current_use); 33 tested_by!(dont_complete_current_use);
diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs
index c96465b6a..c2a9dcdd1 100644
--- a/crates/ra_ide_api/src/db.rs
+++ b/crates/ra_ide_api/src/db.rs
@@ -22,7 +22,6 @@ use crate::{
22 hir::db::InternDatabaseStorage, 22 hir::db::InternDatabaseStorage,
23 hir::db::AstDatabaseStorage, 23 hir::db::AstDatabaseStorage,
24 hir::db::DefDatabaseStorage, 24 hir::db::DefDatabaseStorage,
25 hir::db::DefDatabase2Storage,
26 hir::db::HirDatabaseStorage 25 hir::db::HirDatabaseStorage
27)] 26)]
28#[derive(Debug)] 27#[derive(Debug)]
diff --git a/crates/ra_ide_api/src/display/function_signature.rs b/crates/ra_ide_api/src/display/function_signature.rs
index f42dffc87..d96de4e4c 100644
--- a/crates/ra_ide_api/src/display/function_signature.rs
+++ b/crates/ra_ide_api/src/display/function_signature.rs
@@ -55,7 +55,7 @@ impl FunctionSignature {
55 pub(crate) fn from_struct(db: &db::RootDatabase, st: hir::Struct) -> Option<Self> { 55 pub(crate) fn from_struct(db: &db::RootDatabase, st: hir::Struct) -> Option<Self> {
56 let node: ast::StructDef = st.source(db).value; 56 let node: ast::StructDef = st.source(db).value;
57 match node.kind() { 57 match node.kind() {
58 ast::StructKind::Named(_) => return None, 58 ast::StructKind::Record(_) => return None,
59 _ => (), 59 _ => (),
60 }; 60 };
61 61
@@ -89,7 +89,7 @@ impl FunctionSignature {
89 ) -> Option<Self> { 89 ) -> Option<Self> {
90 let node: ast::EnumVariant = variant.source(db).value; 90 let node: ast::EnumVariant = variant.source(db).value;
91 match node.kind() { 91 match node.kind() {
92 ast::StructKind::Named(_) | ast::StructKind::Unit => return None, 92 ast::StructKind::Record(_) | ast::StructKind::Unit => return None,
93 _ => (), 93 _ => (),
94 }; 94 };
95 95