Skip to content

resolve: Remove ScopeSet::Late #145597

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

petrochenkov
Copy link
Contributor

It's better to decouple the late/early stage from scope set, because in #144131 (comment) we'll need the stage for ScopeSet::Module as well.

See individual commits for the refactoring details.
r? @b-naber

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 19, 2025
@@ -1020,11 +1020,11 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
&mut self,
suggestions: &mut Vec<TypoSuggestion>,
scope_set: ScopeSet<'ra>,
parent_scope: &ParentScope<'ra>,
ps: &ParentScope<'ra>,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatting becomes awful if the visit_scopes call below becomes too long.

} else {
Shadowing::Restricted
},
Shadowing::Restricted,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced with a more fine-grained stage check in fn finalize_module_binding.

@bors

This comment was marked as resolved.

It can be passed in a more usual way through `ParentScope`
The difference between `Late` and `All` only matters when `finalize` is enabled.
So add a `stage` field to `Finalize` and use it instead.
@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@petrochenkov
Copy link
Contributor Author

Added the comment #145597 (comment) and rebased.

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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants