aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs1
-rw-r--r--crates/ra_ide/src/references/rename.rs2
-rw-r--r--crates/ra_ide/src/references/search_scope.rs5
3 files changed, 1 insertions, 7 deletions
diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs
index b376fcdae..add11fbc3 100644
--- a/crates/ra_ide/src/display/navigation_target.rs
+++ b/crates/ra_ide/src/display/navigation_target.rs
@@ -234,7 +234,6 @@ impl ToNav for hir::Module {
234 let syntax = match &src.value { 234 let syntax = match &src.value {
235 ModuleSource::SourceFile(node) => node.syntax(), 235 ModuleSource::SourceFile(node) => node.syntax(),
236 ModuleSource::Module(node) => node.syntax(), 236 ModuleSource::Module(node) => node.syntax(),
237 ModuleSource::Block(node) => node.syntax(),
238 }; 237 };
239 let frange = original_range(db, src.with_value(syntax)); 238 let frange = original_range(db, src.with_value(syntax));
240 NavigationTarget::from_syntax( 239 NavigationTarget::from_syntax(
diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs
index 1abf20215..b804d5f6d 100644
--- a/crates/ra_ide/src/references/rename.rs
+++ b/crates/ra_ide/src/references/rename.rs
@@ -88,7 +88,7 @@ fn rename_mod(
88 file_system_edits.push(move_file); 88 file_system_edits.push(move_file);
89 } 89 }
90 } 90 }
91 ModuleSource::Module(..) | ModuleSource::Block(..) => {} 91 ModuleSource::Module(..) => {}
92 } 92 }
93 } 93 }
94 94
diff --git a/crates/ra_ide/src/references/search_scope.rs b/crates/ra_ide/src/references/search_scope.rs
index 92eb2015b..f5c9589f4 100644
--- a/crates/ra_ide/src/references/search_scope.rs
+++ b/crates/ra_ide/src/references/search_scope.rs
@@ -96,10 +96,6 @@ impl NameDefinition {
96 let range = Some(m.syntax().text_range()); 96 let range = Some(m.syntax().text_range());
97 res.insert(file_id, range); 97 res.insert(file_id, range);
98 } 98 }
99 ModuleSource::Block(b) => {
100 let range = Some(b.syntax().text_range());
101 res.insert(file_id, range);
102 }
103 ModuleSource::SourceFile(_) => { 99 ModuleSource::SourceFile(_) => {
104 res.insert(file_id, None); 100 res.insert(file_id, None);
105 res.extend(parent_module.children(db).map(|m| { 101 res.extend(parent_module.children(db).map(|m| {
@@ -141,7 +137,6 @@ impl NameDefinition {
141 let mut res = FxHashMap::default(); 137 let mut res = FxHashMap::default();
142 let range = match module_src.value { 138 let range = match module_src.value {
143 ModuleSource::Module(m) => Some(m.syntax().text_range()), 139 ModuleSource::Module(m) => Some(m.syntax().text_range()),
144 ModuleSource::Block(b) => Some(b.syntax().text_range()),
145 ModuleSource::SourceFile(_) => None, 140 ModuleSource::SourceFile(_) => None,
146 }; 141 };
147 res.insert(file_id, range); 142 res.insert(file_id, range);