aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/references/rename.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-10-24 12:17:03 +0100
committerGitHub <[email protected]>2019-10-24 12:17:03 +0100
commit95cf5c86fae3adf3bb38521905bf357450125709 (patch)
treedf21a3aec7f580d4c6a768ceee7a7d1f9351838e /crates/ra_ide_api/src/references/rename.rs
parent29a31a663914ef0bfe36e7ff45a58762c9313086 (diff)
parent4529da906db7f18aaf384c079332e4ea12c82d55 (diff)
Merge #2059
2059: for highlighting, search only the current file r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/references/rename.rs')
-rw-r--r--crates/ra_ide_api/src/references/rename.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/references/rename.rs b/crates/ra_ide_api/src/references/rename.rs
index 0e2e088e0..ee6e73e1b 100644
--- a/crates/ra_ide_api/src/references/rename.rs
+++ b/crates/ra_ide_api/src/references/rename.rs
@@ -110,7 +110,7 @@ fn rename_reference(
110 position: FilePosition, 110 position: FilePosition,
111 new_name: &str, 111 new_name: &str,
112) -> Option<RangeInfo<SourceChange>> { 112) -> Option<RangeInfo<SourceChange>> {
113 let RangeInfo { range, info: refs } = find_all_refs(db, position)?; 113 let RangeInfo { range, info: refs } = find_all_refs(db, position, None)?;
114 114
115 let edit = refs 115 let edit = refs
116 .into_iter() 116 .into_iter()
@@ -255,13 +255,13 @@ mod tests {
255 "#; 255 "#;
256 256
257 let (analysis, pos) = analysis_and_position(code); 257 let (analysis, pos) = analysis_and_position(code);
258 let refs = analysis.find_all_refs(pos).unwrap().unwrap(); 258 let refs = analysis.find_all_refs(pos, None).unwrap().unwrap();
259 assert_eq!(refs.len(), 3); 259 assert_eq!(refs.len(), 3);
260 } 260 }
261 261
262 fn get_all_refs(text: &str) -> ReferenceSearchResult { 262 fn get_all_refs(text: &str) -> ReferenceSearchResult {
263 let (analysis, position) = single_file_with_position(text); 263 let (analysis, position) = single_file_with_position(text);
264 analysis.find_all_refs(position).unwrap().unwrap() 264 analysis.find_all_refs(position, None).unwrap().unwrap()
265 } 265 }
266 266
267 #[test] 267 #[test]