Skip to content

Merge generics and where predicates and prevent duplicates in where predicates#105183

Merged
bors merged 3 commits into
rust-lang:masterfrom
GuillaumeGomez:merge-and-dedup-predicates
Dec 3, 2022
Merged

Merge generics and where predicates and prevent duplicates in where predicates#105183
bors merged 3 commits into
rust-lang:masterfrom
GuillaumeGomez:merge-and-dedup-predicates

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Part of #104886 (I didn't include bounds from parent trait yet as I think the PR is already big enough).

Also we'll need to run a perf check.

cc @fmease since you worked a bit on this.
r? @notriddle

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Dec 2, 2022
Comment thread src/librustdoc/clean/mod.rs Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I used FxIndexMap to keep the order of predicates.

@GuillaumeGomez GuillaumeGomez force-pushed the merge-and-dedup-predicates branch from 4d443a9 to d6ceaf9 Compare December 2, 2022 18:40
@GuillaumeGomez GuillaumeGomez force-pushed the merge-and-dedup-predicates branch from d6ceaf9 to 269704a Compare December 2, 2022 18:40
// Some duplicates are generated for ?Sized bounds between type params and where
// predicates. The point in here is to move the bounds definitions from type params
// to where predicates when such cases occur.
for where_pred in &mut generics.where_predicates {

@GuillaumeGomez GuillaumeGomez Dec 2, 2022

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It seems like this whole block was not necessary anymore with my dedup changes above.

@notriddle

Copy link
Copy Markdown
Contributor

@bors r+ rollup=iffy

Seems like it might cause a perf impact.

@bors

bors commented Dec 3, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 269704a has been approved by notriddle

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 Dec 3, 2022
@bors

bors commented Dec 3, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 269704a with merge 4bb1575...

@bors

bors commented Dec 3, 2022

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 4bb1575 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 3, 2022
@bors bors merged commit 4bb1575 into rust-lang:master Dec 3, 2022
@rustbot rustbot added this to the 1.67.0 milestone Dec 3, 2022
@GuillaumeGomez GuillaumeGomez deleted the merge-and-dedup-predicates branch December 3, 2022 15:08
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (4bb1575): 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)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-3.3%, -1.7%] 2
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.6% [1.3%, 1.9%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) - - 0

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-rustdoc Relevant to the rustdoc 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