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.rs56
1 files changed, 56 insertions, 0 deletions
diff --git a/crates/ide/src/rename.rs b/crates/ide/src/rename.rs
index 42b7472c64..e46cb5a781 100644
--- a/crates/ide/src/rename.rs
+++ b/crates/ide/src/rename.rs
@@ -2976,6 +2976,62 @@ fn test() {
}
#[test]
+ fn asm_operand() {
+ check(
+ "bose",
+ r#"
+//- minicore: asm
+fn test() {
+ core::arch::asm!(
+ "push {base}",
+ base$0 = const 0
+ );
+}
+"#,
+ r#"
+fn test() {
+ core::arch::asm!(
+ "push {bose}",
+ bose = const 0
+ );
+}
+"#,
+ );
+ }
+
+ #[test]
+ fn asm_operand2() {
+ check(
+ "bose",
+ r#"
+//- minicore: asm
+fn test() {
+ core::arch::asm!(
+ "push {base$0}",
+ "push {base}",
+ boo = const 0,
+ virtual_free = sym VIRTUAL_FREE,
+ base = const 0,
+ boo = const 0,
+ );
+}
+"#,
+ r#"
+fn test() {
+ core::arch::asm!(
+ "push {bose}",
+ "push {bose}",
+ boo = const 0,
+ virtual_free = sym VIRTUAL_FREE,
+ bose = const 0,
+ boo = const 0,
+ );
+}
+"#,
+ );
+ }
+
+ #[test]
fn rename_path_inside_use_tree() {
check(
"Baz",