Add more comments as requested
This commit is contained in:
parent
6dc7fa9423
commit
a0c8bee35e
@ -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.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user