-
Notifications
You must be signed in to change notification settings - Fork 256
Rename alias changes original import #818
Comments
The Rust compiler loses knowledge of aliasing very early in compilation so by the later stages (and in the RLS) we only know that uses of We should not do this, we'll need to detect it in the RLS, but I'm not sure how to do that. |
You know, I don't think relying on the compiler is such a good idea and this is a reason why. And what if I did this with an external crate? What actually requires the compiler and what could be done with just static analysis? |
OK, so this is a bit trickier than expected. Tracking the bits of work:
|
Most of this is done now (with rust-lang/rust#50795 merging). Outstanding work:
|
This sort of works in the RLS: we block renaming the aliased import, but we seem to block renaming all functions too. |
Tested and working and added a test to rls-analysis. |
Given
Renaming
ParserTrait
to sayCombo
givesCompare that to
which turns into
This is kind of annoying. What gives? (Also, feel free to make the title more descriptive)
EDIT: Checklist!:
The text was updated successfully, but these errors were encountered: