Skip to content

Some where clause lowering simplifications #132196

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

Merged
merged 3 commits into from
Nov 1, 2024

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

This comment was marked as resolved.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 1, 2024

📌 Commit 81dba07 has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 1, 2024
@bors
Copy link
Collaborator

bors commented Nov 1, 2024

⌛ Testing commit 81dba07 with merge 5ca0e9f...

@bors
Copy link
Collaborator

bors commented Nov 1, 2024

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 5ca0e9f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 1, 2024
@bors bors merged commit 5ca0e9f into rust-lang:master Nov 1, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 1, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5ca0e9f): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 779.851s -> 780.79s (0.12%)
Artifact size: 334.92 MiB -> 334.96 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants