aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir/src/code_model_api.rs2
-rw-r--r--crates/ra_ide_api/src/impls.rs3
2 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs
index 691cd5798..53e84429c 100644
--- a/crates/ra_hir/src/code_model_api.rs
+++ b/crates/ra_hir/src/code_model_api.rs
@@ -24,7 +24,7 @@ use crate::{
24/// root module. 24/// root module.
25#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 25#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
26pub struct Crate { 26pub struct Crate {
27 pub crate_id: CrateId, 27 pub(crate) crate_id: CrateId,
28} 28}
29 29
30#[derive(Debug)] 30#[derive(Debug)]
diff --git a/crates/ra_ide_api/src/impls.rs b/crates/ra_ide_api/src/impls.rs
index 16a05758a..469d56d63 100644
--- a/crates/ra_ide_api/src/impls.rs
+++ b/crates/ra_ide_api/src/impls.rs
@@ -14,9 +14,8 @@ pub(crate) fn goto_implementation(
14 let file = db.parse(position.file_id); 14 let file = db.parse(position.file_id);
15 let syntax = file.syntax(); 15 let syntax = file.syntax();
16 16
17 let krate_id = db.crate_for(position.file_id).pop()?;
18 let krate = hir::Crate { crate_id: krate_id };
19 let module = source_binder::module_from_position(db, position)?; 17 let module = source_binder::module_from_position(db, position)?;
18 let krate = module.krate(db)?;
20 19
21 let node = find_node_at_offset::<ast::NominalDef>(syntax, position.offset)?; 20 let node = find_node_at_offset::<ast::NominalDef>(syntax, position.offset)?;
22 let ty = match node.kind() { 21 let ty = match node.kind() {