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

Make function pointers implement traits for up to 12 parameters #28560

Merged
merged 1 commit into from
Sep 21, 2015

Conversation

Manishearth
Copy link
Member

(12 was chosen to be consistent with what we do for tuples)

Fixes #28559

(12 was chosen to be consistent with what we do for tuples)

Fixes rust-lang#28559
@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@nrc nrc assigned nrc and unassigned aturon Sep 21, 2015
@nrc
Copy link
Member

nrc commented Sep 21, 2015

@bors: r+

@bors
Copy link
Contributor

bors commented Sep 21, 2015

📌 Commit 5f66c70 has been approved by nrc

bors added a commit that referenced this pull request Sep 21, 2015
(12 was chosen to be consistent with what we do for tuples)

Fixes #28559
@bors
Copy link
Contributor

bors commented Sep 21, 2015

⌛ Testing commit 5f66c70 with merge 6217b00...

@bors bors merged commit 5f66c70 into rust-lang:master Sep 21, 2015
@petrochenkov
Copy link
Contributor

@Manishearth
Implementations for function pointers were "trimmed" a bit in #28268 to reduce some pretty nasty code bloat. 8 arguments would be enough for backward compatibility with stable.
Well, yes, it required a crater run~~, but who on earth uses functions with 12 arguments?!~~

@Manishearth Manishearth deleted the fix-fnptr-impls branch September 21, 2015 15:43
@Manishearth
Copy link
Member Author

Functions with a large number of arguments being used in other structs are basically inevitable in bindings.

@alexcrichton
Copy link
Member

It's always good to do a bit of investigation into what caused regressions if they do happen, and as @petrochenkov mentioned we did indeed cut these back to reduce the massive metadata size of libcore. The number chosen for tuples was completely arbitrary, so there's not real reason to match it for functions, and I would prefer to have only the bare minimum necessary to get things working until we find a better solution.

This is ok because it already landed, but always nice to not be too hasty!

@Manishearth
Copy link
Member Author

Will do, sorry about the trouble.

@gkoz
Copy link
Contributor

gkoz commented Sep 21, 2015

Is there an issue documenting the bloat problem?

@bluss bluss added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 23, 2015
@alexcrichton alexcrichton added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 7, 2015
@alexcrichton
Copy link
Member

triage: beta-nominated

Nominating for a backport as this fixes a reported regression with chipmunk-sys and is pretty harmless.

@alexcrichton alexcrichton added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Oct 7, 2015
@alexcrichton
Copy link
Member

The libs team decided to accept this for a backport to beta

@alexcrichton alexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Oct 8, 2015
@brson brson mentioned this pull request Oct 16, 2015
@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. relnotes Marks issues that should be documented in the release notes of the next release. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants