Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/rename.rs')
| -rw-r--r-- | crates/ide/src/rename.rs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/crates/ide/src/rename.rs b/crates/ide/src/rename.rs index 11bbd99110..ba739df309 100644 --- a/crates/ide/src/rename.rs +++ b/crates/ide/src/rename.rs @@ -456,7 +456,11 @@ mod tests { use super::{RangeInfo, RenameError}; #[track_caller] - fn check(new_name: &str, ra_fixture_before: &str, ra_fixture_after: &str) { + fn check( + new_name: &str, + #[rust_analyzer::rust_fixture] ra_fixture_before: &str, + #[rust_analyzer::rust_fixture] ra_fixture_after: &str, + ) { let ra_fixture_after = &trim_indent(ra_fixture_after); let (analysis, position) = fixture::position(ra_fixture_before); if !ra_fixture_after.starts_with("error: ") { @@ -494,14 +498,22 @@ mod tests { }; } - fn check_expect(new_name: &str, ra_fixture: &str, expect: Expect) { + fn check_expect( + new_name: &str, + #[rust_analyzer::rust_fixture] ra_fixture: &str, + expect: Expect, + ) { let (analysis, position) = fixture::position(ra_fixture); let source_change = analysis.rename(position, new_name).unwrap().expect("Expect returned a RenameError"); expect.assert_eq(&filter_expect(source_change)) } - fn check_expect_will_rename_file(new_name: &str, ra_fixture: &str, expect: Expect) { + fn check_expect_will_rename_file( + new_name: &str, + #[rust_analyzer::rust_fixture] ra_fixture: &str, + expect: Expect, + ) { let (analysis, position) = fixture::position(ra_fixture); let source_change = analysis .will_rename_file(position.file_id, new_name) @@ -510,7 +522,7 @@ mod tests { expect.assert_eq(&filter_expect(source_change)) } - fn check_prepare(ra_fixture: &str, expect: Expect) { + fn check_prepare(#[rust_analyzer::rust_fixture] ra_fixture: &str, expect: Expect) { let (analysis, position) = fixture::position(ra_fixture); let result = analysis .prepare_rename(position) |