aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/references
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/references')
-rw-r--r--crates/ra_ide/src/references/rename.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs
index 91545e025..7ebc0adcf 100644
--- a/crates/ra_ide/src/references/rename.rs
+++ b/crates/ra_ide/src/references/rename.rs
@@ -271,12 +271,10 @@ fn rename_reference(
271mod tests { 271mod tests {
272 use insta::assert_debug_snapshot; 272 use insta::assert_debug_snapshot;
273 use ra_text_edit::TextEditBuilder; 273 use ra_text_edit::TextEditBuilder;
274 use stdx::trim_indent;
274 use test_utils::{assert_eq_text, mark}; 275 use test_utils::{assert_eq_text, mark};
275 276
276 use crate::{ 277 use crate::{mock_analysis::analysis_and_position, FileId};
277 mock_analysis::analysis_and_position, mock_analysis::single_file_with_position, FileId,
278 };
279 use stdx::trim_indent;
280 278
281 #[test] 279 #[test]
282 fn test_rename_to_underscore() { 280 fn test_rename_to_underscore() {
@@ -310,7 +308,7 @@ mod tests {
310 308
311 #[test] 309 #[test]
312 fn test_rename_to_invalid_identifier() { 310 fn test_rename_to_invalid_identifier() {
313 let (analysis, position) = single_file_with_position( 311 let (analysis, position) = analysis_and_position(
314 " 312 "
315 fn main() { 313 fn main() {
316 let i<|> = 1; 314 let i<|> = 1;
@@ -1056,7 +1054,7 @@ pub mod foo<|>;
1056 1054
1057 fn test_rename(ra_fixture_before: &str, new_name: &str, ra_fixture_after: &str) { 1055 fn test_rename(ra_fixture_before: &str, new_name: &str, ra_fixture_after: &str) {
1058 let ra_fixture_after = &trim_indent(ra_fixture_after); 1056 let ra_fixture_after = &trim_indent(ra_fixture_after);
1059 let (analysis, position) = single_file_with_position(ra_fixture_before); 1057 let (analysis, position) = analysis_and_position(ra_fixture_before);
1060 let source_change = analysis.rename(position, new_name).unwrap(); 1058 let source_change = analysis.rename(position, new_name).unwrap();
1061 let mut text_edit_builder = TextEditBuilder::default(); 1059 let mut text_edit_builder = TextEditBuilder::default();
1062 let mut file_id: Option<FileId> = None; 1060 let mut file_id: Option<FileId> = None;