From 088f50c0ab351d5ac072547a47c1ce7eeae029f3 Mon Sep 17 00:00:00 2001 From: ice1000 Date: Wed, 4 Dec 2019 13:35:24 -0500 Subject: No block at the moment --- crates/ra_ide/src/display/navigation_target.rs | 1 - crates/ra_ide/src/references/rename.rs | 2 +- crates/ra_ide/src/references/search_scope.rs | 5 ----- 3 files changed, 1 insertion(+), 7 deletions(-) (limited to 'crates/ra_ide/src') 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 { let syntax = match &src.value { ModuleSource::SourceFile(node) => node.syntax(), ModuleSource::Module(node) => node.syntax(), - ModuleSource::Block(node) => node.syntax(), }; let frange = original_range(db, src.with_value(syntax)); 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( file_system_edits.push(move_file); } } - ModuleSource::Module(..) | ModuleSource::Block(..) => {} + ModuleSource::Module(..) => {} } } 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 { let range = Some(m.syntax().text_range()); res.insert(file_id, range); } - ModuleSource::Block(b) => { - let range = Some(b.syntax().text_range()); - res.insert(file_id, range); - } ModuleSource::SourceFile(_) => { res.insert(file_id, None); res.extend(parent_module.children(db).map(|m| { @@ -141,7 +137,6 @@ impl NameDefinition { let mut res = FxHashMap::default(); let range = match module_src.value { ModuleSource::Module(m) => Some(m.syntax().text_range()), - ModuleSource::Block(b) => Some(b.syntax().text_range()), ModuleSource::SourceFile(_) => None, }; res.insert(file_id, range); -- cgit v1.2.3