aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r--crates/ra_ide_api/src/completion/complete_dot.rs2
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs2
-rw-r--r--crates/ra_ide_api/src/completion/completion_item.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs
index bf6d91a09..886dc54d4 100644
--- a/crates/ra_ide_api/src/completion/complete_dot.rs
+++ b/crates/ra_ide_api/src/completion/complete_dot.rs
@@ -27,7 +27,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty)
27 for receiver in receiver.autoderef(ctx.db) { 27 for receiver in receiver.autoderef(ctx.db) {
28 match receiver { 28 match receiver {
29 Ty::Adt { def_id, .. } => { 29 Ty::Adt { def_id, .. } => {
30 match def_id.resolve(ctx.db)? { 30 match def_id.resolve(ctx.db) {
31 Def::Struct(s) => { 31 Def::Struct(s) => {
32 for field in s.fields(ctx.db) { 32 for field in s.fields(ctx.db) {
33 CompletionItem::new( 33 CompletionItem::new(
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs
index 6388197be..207a509b3 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide_api/src/completion/complete_path.rs
@@ -12,7 +12,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) -> C
12 Some(it) => it, 12 Some(it) => it,
13 None => return Ok(()), 13 None => return Ok(()),
14 }; 14 };
15 match def_id.resolve(ctx.db)? { 15 match def_id.resolve(ctx.db) {
16 hir::Def::Module(module) => { 16 hir::Def::Module(module) => {
17 let module_scope = module.scope(ctx.db)?; 17 let module_scope = module.scope(ctx.db)?;
18 for (name, res) in module_scope.entries() { 18 for (name, res) in module_scope.entries() {
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs
index b75d65de3..11d00f78c 100644
--- a/crates/ra_ide_api/src/completion/completion_item.rs
+++ b/crates/ra_ide_api/src/completion/completion_item.rs
@@ -144,7 +144,7 @@ impl Builder {
144 ctx: &CompletionContext, 144 ctx: &CompletionContext,
145 resolution: &hir::Resolution, 145 resolution: &hir::Resolution,
146 ) -> Builder { 146 ) -> Builder {
147 let resolved = resolution.def_id.and_then(|d| d.resolve(ctx.db).ok()); 147 let resolved = resolution.def_id.map(|d| d.resolve(ctx.db));
148 let kind = match resolved { 148 let kind = match resolved {
149 PerNs { 149 PerNs {
150 types: Some(hir::Def::Module(..)), 150 types: Some(hir::Def::Module(..)),