resolve: Remove force parameter from resolve_ident_in_scope#151873
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Jan 31, 2026
Merged
resolve: Remove force parameter from resolve_ident_in_scope#151873rust-bors[bot] merged 1 commit intorust-lang:mainfrom
force parameter from resolve_ident_in_scope#151873rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
r? @chenyukang rustbot has assigned @chenyukang. Use |
petrochenkov
commented
Jan 30, 2026
| } | ||
| Err(Undetermined) => return PathResult::Indeterminate, | ||
| Err(Determined) => { | ||
| Err(Undetermined) if finalize.is_none() => return PathResult::Indeterminate, |
Contributor
Author
There was a problem hiding this comment.
The obscure case.
| derive, | ||
| parent_scope, | ||
| force, | ||
| false, |
Contributor
Author
There was a problem hiding this comment.
This change is responsible for the test change in tests/ui/macros/macro-rules-as-derive-or-attr-issue-132928.rs.
It's ok, the resolution here is a speculative intermediate step and it doesn't need to leave traces.
Member
|
Nice little cleanup, r=me when green |
estebank
approved these changes
Jan 30, 2026
Member
|
@bors r=lqd,estebank rollup |
Contributor
rust-timer
added a commit
that referenced
this pull request
Jan 31, 2026
Rollup merge of #151873 - petrochenkov:resrefact, r=lqd,estebank resolve: Remove `force` parameter from `resolve_ident_in_scope` `force == true` is used for turning `Determinacy::Undetermined` into `Determinacy::Determined` during error recovery. It's only needed in two places: - `resolve_macro_or_delegation_path` - the normal case - `resolve_path_with_ribs` - obscure case, only when resolving visibilities and only for improving diagnostics in `tests\ui\resolve\visibility-indeterminate.rs`, I'm not actually sure if we should keep it In other cases `Determinacy::Undetermined` is just ignored or can be propagated.
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Jan 31, 2026
…uwer Rollup of 2 pull requests Successful merges: - rust-lang/rust#151281 (constify `Iterator`, take IV) - rust-lang/rust#151873 (resolve: Remove `force` parameter from `resolve_ident_in_scope`)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
force == trueis used for turningDeterminacy::UndeterminedintoDeterminacy::Determinedduring error recovery.It's only needed in two places:
resolve_macro_or_delegation_path- the normal caseresolve_path_with_ribs- obscure case, only when resolving visibilities and only for improving diagnostics intests\ui\resolve\visibility-indeterminate.rs, I'm not actually sure if we should keep itIn other cases
Determinacy::Undeterminedis just ignored or can be propagated.