diff options
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_path.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/goto_definition.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs index a0c5572d5..d337fe970 100644 --- a/crates/ra_ide_api/src/completion/complete_path.rs +++ b/crates/ra_ide_api/src/completion/complete_path.rs | |||
@@ -10,7 +10,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) { | |||
10 | Some(path) => path.clone(), | 10 | Some(path) => path.clone(), |
11 | _ => return, | 11 | _ => return, |
12 | }; | 12 | }; |
13 | let def = match ctx.resolver.resolve_path(ctx.db, &path).into_per_ns().take_types() { | 13 | let def = match ctx.resolver.resolve_path(ctx.db, &path).take_types() { |
14 | Some(Resolution::Def(def)) => def, | 14 | Some(Resolution::Def(def)) => def, |
15 | _ => return, | 15 | _ => return, |
16 | }; | 16 | }; |
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs index 76aaebd52..96ed8c8e9 100644 --- a/crates/ra_ide_api/src/goto_definition.rs +++ b/crates/ra_ide_api/src/goto_definition.rs | |||
@@ -79,7 +79,7 @@ pub(crate) fn reference_definition( | |||
79 | if let Some(path) = | 79 | if let Some(path) = |
80 | name_ref.syntax().ancestors().find_map(ast::Path::cast).and_then(hir::Path::from_ast) | 80 | name_ref.syntax().ancestors().find_map(ast::Path::cast).and_then(hir::Path::from_ast) |
81 | { | 81 | { |
82 | let resolved = resolver.resolve_path(db, &path).into_per_ns(); | 82 | let resolved = resolver.resolve_path(db, &path); |
83 | match resolved.clone().take_types().or_else(|| resolved.take_values()) { | 83 | match resolved.clone().take_types().or_else(|| resolved.take_values()) { |
84 | Some(Resolution::Def(def)) => return Exact(NavigationTarget::from_def(db, def)), | 84 | Some(Resolution::Def(def)) => return Exact(NavigationTarget::from_def(db, def)), |
85 | Some(Resolution::LocalBinding(pat)) => { | 85 | Some(Resolution::LocalBinding(pat)) => { |