-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
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::probe
module 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_segment
andunusable_binding
are replaced by function parameters.In order to manage the fallout,
maybe_
variants of the function are added, dedicated to speculative resolution.r? @petrochenkov