Skip to content

Commit a0c8bee

Browse files
committed
Add more comments as requested
1 parent 6dc7fa9 commit a0c8bee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/ide-db/src/rename.rs

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ impl Definition {
7373
) -> Result<SourceChange> {
7474
// self.krate() returns None if
7575
// self is a built-in attr, built-in type or tool module.
76+
// it is not allowed for these defs to be renamed.
77+
// cases where self.krate() is None is handled below.
7678
if let Some(krate) = self.krate(sema.db) {
7779
if !krate.origin(sema.db).is_local() {
7880
bail!("Cannot rename a non-local definition.")

0 commit comments

Comments
 (0)