Skip to content

Reserve necessary space for params in generics_of #80208

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Dec 22, 2020

Conversation

bugadani
Copy link
Contributor

Always reserve space for the exact number of generic parameters we need in generics_of. As far as I can see, the default is 0/4 elements based on has_self, and the vector grows on after that.

@rust-highfive
Copy link
Contributor

r? @matthewjasper

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 19, 2020
@matthewjasper
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 20, 2020

📌 Commit 01d7f87 has been approved by matthewjasper

@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 20, 2020
@jyn514
Copy link
Member

jyn514 commented Dec 21, 2020

This could have a perf impact, are you sure it should be rolled up?

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 21, 2020
…ewjasper

Reserve necessary space for params in generics_of

Always reserve space for the exact number of generic parameters we need in generics_of. As far as I can see, the default is 0/4 elements based on has_self, and the vector grows on after that.
@Mark-Simulacrum
Copy link
Member

@bors rollup=never

@bors
Copy link
Collaborator

bors commented Dec 22, 2020

⌛ Testing commit 01d7f87 with merge 9310aff...

@bors
Copy link
Collaborator

bors commented Dec 22, 2020

☀️ Test successful - checks-actions
Approved by: matthewjasper
Pushing 9310aff to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 22, 2020
@bors bors merged commit 9310aff into rust-lang:master Dec 22, 2020
@rustbot rustbot added this to the 1.50.0 milestone Dec 22, 2020
# for free to join this conversation on GitHub. Already have an account? # 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants