aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorgfreezy <[email protected]>2019-01-16 13:39:01 +0000
committerAleksey Kladov <[email protected]>2019-01-19 12:36:58 +0000
commit5c8cb56506646637e45a646657baf12fa9a8f49a (patch)
tree132edba357d82b4f011ea580c7e73e36c7cde02b /crates/ra_hir
parentbc0f79f74ad0ab4f663b94772ccbfabed1de625e (diff)
move rename to a new mod
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/source_binder.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 7ab8eeae2..be82d804a 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -35,14 +35,9 @@ pub fn module_from_declaration(
35 let parent_module = module_from_file_id(db, file_id); 35 let parent_module = module_from_file_id(db, file_id);
36 let child_name = decl.name(); 36 let child_name = decl.name();
37 match (parent_module, child_name) { 37 match (parent_module, child_name) {
38 (Some(parent_module), Some(child_name)) => { 38 (Some(parent_module), Some(child_name)) => parent_module.child(db, &child_name.as_name()),
39 if let Some(child) = parent_module.child(db, &child_name.as_name()) { 39 _ => None,
40 return Some(child);
41 }
42 }
43 _ => (),
44 } 40 }
45 None
46} 41}
47 42
48/// Locates the module by position in the source code. 43/// Locates the module by position in the source code.