mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Remove unused highlights_code_inside_macro snapshot, inline rename_mod_in_dir snapshot
This commit is contained in:
parent
3e086528ef
commit
164ba6092c
3 changed files with 33 additions and 83 deletions
|
@ -356,7 +356,39 @@ mod tests {
|
|||
);
|
||||
let new_name = "foo2";
|
||||
let source_change = analysis.rename(position, new_name).unwrap();
|
||||
assert_debug_snapshot_matches!("rename_mod_in_dir", &source_change);
|
||||
assert_debug_snapshot_matches!(&source_change,
|
||||
@r#"Some(
|
||||
SourceChange {
|
||||
label: "rename",
|
||||
source_file_edits: [
|
||||
SourceFileEdit {
|
||||
file_id: FileId(
|
||||
1,
|
||||
),
|
||||
edit: TextEdit {
|
||||
atoms: [
|
||||
AtomTextEdit {
|
||||
delete: [4; 7),
|
||||
insert: "foo2",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
file_system_edits: [
|
||||
MoveFile {
|
||||
src: FileId(
|
||||
2,
|
||||
),
|
||||
dst_source_root: SourceRootId(
|
||||
0,
|
||||
),
|
||||
dst_path: "foo2/mod.rs",
|
||||
},
|
||||
],
|
||||
cursor_position: None,
|
||||
},
|
||||
)"#);
|
||||
}
|
||||
|
||||
fn test_rename(text: &str, new_name: &str, expected: &str) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue