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

Do not use box syntax in std #106981

Merged
merged 1 commit into from
Jan 23, 2023
Merged

Conversation

joboet
Copy link
Member

@joboet joboet commented Jan 17, 2023

See #94970 and #49733. About half of the box instances in std do not even need to allocate, the other half can simply be replaced with Box::new.

@rustbot label +T-libs
r? rust-lang/libs

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 17, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 17, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@thomcc
Copy link
Member

thomcc commented Jan 17, 2023

At one point this had perf implications. Seems highly unlikely for this patch, but measuring can't hurt.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 17, 2023
@bors
Copy link
Contributor

bors commented Jan 17, 2023

⌛ Trying commit 7f2cf19 with merge 0610c4d3402a5128c3b2bb5d074c332197053e14...

@bors
Copy link
Contributor

bors commented Jan 17, 2023

☀️ Try build successful - checks-actions
Build commit: 0610c4d3402a5128c3b2bb5d074c332197053e14 (0610c4d3402a5128c3b2bb5d074c332197053e14)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0610c4d3402a5128c3b2bb5d074c332197053e14): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -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)
2.4% [2.4%, 2.4%] 1
Improvements ✅
(primary)
-1.5% [-2.3%, -0.7%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.5% [-2.3%, -0.7%] 2

Cycles

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

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 17, 2023
@thomcc
Copy link
Member

thomcc commented Jan 19, 2023

Sorry for the delay. You also rewrote a bunch of code at the same time, which complicated review (in the future, it would be better for those to be separate PRs, TBH).

@bors r+

@bors
Copy link
Contributor

bors commented Jan 19, 2023

📌 Commit 7f2cf19 has been approved by thomcc

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 Jan 19, 2023
@bors
Copy link
Contributor

bors commented Jan 23, 2023

⌛ Testing commit 7f2cf19 with merge d3322e2...

@bors
Copy link
Contributor

bors commented Jan 23, 2023

☀️ Test successful - checks-actions
Approved by: thomcc
Pushing d3322e2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 23, 2023
@bors bors merged commit d3322e2 into rust-lang:master Jan 23, 2023
@rustbot rustbot added this to the 1.69.0 milestone Jan 23, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d3322e2): 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.

@joboet joboet deleted the std_remove_box_syntax branch January 24, 2023 18:08
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-libs Relevant to the library 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