This commit is contained in:
Ali Bektas 2023-09-10 23:25:36 +02:00
parent a0c8bee35e
commit 0118741632

View File

@ -93,13 +93,7 @@ impl Definition {
bail!("Cannot rename a builtin attr.")
}
Definition::SelfType(_) => bail!("Cannot rename `Self`"),
Definition::Macro(mac) => {
if mac.is_builtin_derive(sema.db) {
bail!("Cannot rename builtin derive")
}
rename_reference(sema, Definition::Macro(mac), new_name)
}
Definition::Macro(mac) => rename_reference(sema, Definition::Macro(mac), new_name),
def => rename_reference(sema, def, new_name),
}
}