diff options
Diffstat (limited to 'crates/ra_analysis/src/hir/module')
-rw-r--r-- | crates/ra_analysis/src/hir/module/mod.rs | 4 | ||||
-rw-r--r-- | crates/ra_analysis/src/hir/module/nameres.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_analysis/src/hir/module/mod.rs b/crates/ra_analysis/src/hir/module/mod.rs index 83f176b32..893ec3a10 100644 --- a/crates/ra_analysis/src/hir/module/mod.rs +++ b/crates/ra_analysis/src/hir/module/mod.rs | |||
@@ -134,7 +134,7 @@ impl Module { | |||
134 | id: self.module_id, | 134 | id: self.module_id, |
135 | source_root: self.source_root_id, | 135 | source_root: self.source_root_id, |
136 | }; | 136 | }; |
137 | db.id_maps().def_id(def_loc) | 137 | def_loc.id(db) |
138 | } | 138 | } |
139 | 139 | ||
140 | /// Finds a child module with the specified name. | 140 | /// Finds a child module with the specified name. |
@@ -167,7 +167,7 @@ impl Module { | |||
167 | 167 | ||
168 | let segments = path.segments; | 168 | let segments = path.segments; |
169 | for name in segments.iter() { | 169 | for name in segments.iter() { |
170 | let module = match db.id_maps().def_loc(curr) { | 170 | let module = match curr.loc(db) { |
171 | DefLoc::Module { id, source_root } => Module::new(db, source_root, id)?, | 171 | DefLoc::Module { id, source_root } => Module::new(db, source_root, id)?, |
172 | _ => return Ok(None), | 172 | _ => return Ok(None), |
173 | }; | 173 | }; |
diff --git a/crates/ra_analysis/src/hir/module/nameres.rs b/crates/ra_analysis/src/hir/module/nameres.rs index f22832eda..f48f51c8d 100644 --- a/crates/ra_analysis/src/hir/module/nameres.rs +++ b/crates/ra_analysis/src/hir/module/nameres.rs | |||
@@ -256,7 +256,7 @@ where | |||
256 | item_id: item.id, | 256 | item_id: item.id, |
257 | }, | 257 | }, |
258 | }; | 258 | }; |
259 | let def_id = self.db.id_maps().def_id(def_loc); | 259 | let def_id = def_loc.id(self.db); |
260 | let resolution = Resolution { | 260 | let resolution = Resolution { |
261 | def_id: Some(def_id), | 261 | def_id: Some(def_id), |
262 | import: None, | 262 | import: None, |
@@ -269,7 +269,7 @@ where | |||
269 | id: mod_id, | 269 | id: mod_id, |
270 | source_root: self.source_root, | 270 | source_root: self.source_root, |
271 | }; | 271 | }; |
272 | let def_id = self.db.id_maps().def_id(def_loc); | 272 | let def_id = def_loc.id(self.db); |
273 | let resolution = Resolution { | 273 | let resolution = Resolution { |
274 | def_id: Some(def_id), | 274 | def_id: Some(def_id), |
275 | import: None, | 275 | import: None, |
@@ -318,7 +318,7 @@ where | |||
318 | }; | 318 | }; |
319 | 319 | ||
320 | if !is_last { | 320 | if !is_last { |
321 | curr = match self.db.id_maps().def_loc(def_id) { | 321 | curr = match def_id.loc(self.db) { |
322 | DefLoc::Module { id, .. } => id, | 322 | DefLoc::Module { id, .. } => id, |
323 | _ => return, | 323 | _ => return, |
324 | } | 324 | } |