-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Disallow renaming of non-local items #15232
Conversation
I think it should include all items (ADTs, functions, consts, ...) |
crates/ide-db/src/rename.rs
Outdated
if mac.is_builtin_derive(sema.db) { | ||
bail!("Cannot rename builtin macro") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't seem to find a way that would bypass Cannot rename a non-local definition.
and bail out at Cannot rename builtin derive
☔ The latest upstream changes (presumably #15377) made this pull request unmergeable. Please resolve the merge conflicts. |
@rustbot review |
@bors r+ |
☀️ Test successful - checks-actions |
fixes #14850 . This makes me wonder , why stop at structs and not do the same for other ADTs? Would be happy to add them too if nothing speaks against it.