Skip to content
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

Some where clause lowering simplifications #132196

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

Conversation

compiler-errors
Copy link
Member

Rename PredicateFilter::SelfThatDefines to PredicateFilter::SelfTraitThatDefines to make it clear that it's only concerned with converting traits, and make it do a bit less work when converting bounds.

Also, make the predicate filter matching in probe_ty_param_bounds_in_generics explicit, and simply the args it receives a bit.

@rustbot
Copy link
Collaborator

rustbot commented Oct 26, 2024

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Oct 26, 2024
@rustbot
Copy link
Collaborator

rustbot commented Oct 26, 2024

HIR ty lowering was modified

cc @fmease

@petrochenkov
Copy link
Contributor

Are there any observable effects from the second commit?
Or it's just a refactoring? (Due to the logic at the end of fn type_param_predicates?)
I'm not familiar with this code.

r=me after the explanation.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 27, 2024
Copy link
Member Author

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

No, this should not have observable changes.

SelfTraitThatDefines is a filter that is concerned with gathering trait predicates of the form ParamTy: Trait for a given ParamTy. We did this previously somewhat haphazardly, both when lowering the bounds, and then re-filtering the bounds again after they've been collected, since the existing predicate filter handling was too lax.

Let me add a debug assertion back that I removed to validate that any further refactorings to the PredicateFilters doesn't accidentally reintroduce this behavior.

@compiler-errors
Copy link
Member Author

forgot to flip back to ready:

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 31, 2024
@bors
Copy link
Contributor

bors commented Oct 31, 2024

☔ The latest upstream changes (presumably #132377) 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. 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