about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crates/ide-db/src/rename.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ide-db/src/rename.rs b/crates/ide-db/src/rename.rs
index a60b2423595..f6de3a88848 100644
--- a/crates/ide-db/src/rename.rs
+++ b/crates/ide-db/src/rename.rs
@@ -73,6 +73,8 @@ impl Definition {
     ) -> Result<SourceChange> {
         // self.krate() returns None if
         // self is a built-in attr, built-in type or tool module.
+        // it is not allowed for these defs to be renamed.
+        // cases where self.krate() is None is handled below.
         if let Some(krate) = self.krate(sema.db) {
             if !krate.origin(sema.db).is_local() {
                 bail!("Cannot rename a non-local definition.")