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.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/crates/ide/src/rename.rs b/crates/ide/src/rename.rs
index 11bbd99110..fdf8fe452b 100644
--- a/crates/ide/src/rename.rs
+++ b/crates/ide/src/rename.rs
@@ -494,14 +494,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 +518,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)