Skip to content

Do not use dyn HirDatabase, only dyn SourceDatabase - #22968

Open
ChayimFriedman2 wants to merge 7 commits into
rust-lang:masterfrom
ChayimFriedman2:no-dyn-hirdb
Open

Do not use dyn HirDatabase, only dyn SourceDatabase#22968
ChayimFriedman2 wants to merge 7 commits into
rust-lang:masterfrom
ChayimFriedman2:no-dyn-hirdb

Conversation

@ChayimFriedman2

Copy link
Copy Markdown
Contributor

To save a virtual call.

Reviewing commit-by-commit is recommended. The commit messages are also important.

I authored a script to use rust-analyzer's own autoimport assist to do that automatically on all files. Then added manually two more imports in interner.rs because the script didn't handle multiple modules in one file correctly.
 - Implement `as_dyn()` for DBs
 - Remove usage of `as_dyn()` in tests, it's now a compile error
 - Replace `HirDatabase::zalsa_register_downcaster()` with `SourceDatabase::zalsa_register_downcaster()`
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2026
@rustbot

rustbot commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (possibly #22966) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants