Move name resolution logic to a dedicated file#95405
Conversation
|
Some preliminary comments:
|
|
I believe this version addresses your first round of reviews. The refactor of
Just because I found
Done.
I understand the |
This comment has been minimized.
This comment has been minimized.
Well, if we have ( |
This comment was marked as resolved.
This comment was marked as resolved.
|
r=me with #95405 (comment) applied. |
|
@bors r=petrochenkov |
|
📌 Commit 276b946 has been approved by |
Rollup of 7 pull requests Successful merges: - rust-lang#95316 (Rustdoc: Discriminate required and provided associated constants and types) - rust-lang#95405 (Move name resolution logic to a dedicated file) - rust-lang#95914 (Implement tuples using recursion) - rust-lang#95918 (Delay a bug when we see SelfCtor in ref pattern) - rust-lang#95970 (Fix suggestions in case of `T:` bounds) - rust-lang#95973 (prevent opaque types from appearing in impl headers) - rust-lang#95986 (Autolabel library PRs with T-libs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
resolve: Cleanup path resolution finalization Some cleanup after rust-lang#95255 and rust-lang#95405. r? `@cjgillot`
The code resolution logic from an Ident is scattered between several files.
The first commits creates
rustc_resolve::probemodule to hold the different mutually recursive functions together. Just a move, no code change.The following commits attempt to make the logic a bit more readable.
The two fields
last_import_segmentandunusable_bindingare replaced by function parameters.In order to manage the fallout,
maybe_variants of the function are added, dedicated to speculative resolution.r? @petrochenkov