mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add more comments as requested
This commit is contained in:
parent
6dc7fa9423
commit
a0c8bee35e
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue