We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dc7fa9 commit a0c8beeCopy full SHA for a0c8bee
crates/ide-db/src/rename.rs
@@ -73,6 +73,8 @@ impl Definition {
73
) -> Result<SourceChange> {
74
// self.krate() returns None if
75
// 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.
78
if let Some(krate) = self.krate(sema.db) {
79
if !krate.origin(sema.db).is_local() {
80
bail!("Cannot rename a non-local definition.")
0 commit comments