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

Implement unstable ffi_return_twice attribute #58315

Merged
merged 5 commits into from
Feb 24, 2019

Conversation

gnzlbg
Copy link
Contributor

@gnzlbg gnzlbg commented Feb 8, 2019

This PR implements RFC2633

r? @eddyb

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 8, 2019
@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 9, 2019

I'd prefer to enable this only for extern functions. Is there an easy way to error if this attribute is applied to something else?

EDIT: done, I've submitted an RFC for this.

@eddyb
Copy link
Member

eddyb commented Feb 14, 2019

r? @alexcrichton / @rkruppe / @nagisa

@rust-highfive rust-highfive assigned alexcrichton and unassigned eddyb Feb 14, 2019
@hanna-kruppe
Copy link
Contributor

Code LGTM. Does anyone have a strong opinion on whether to merge this now or wait how the RFC plays out?

@eddyb
Copy link
Member

eddyb commented Feb 14, 2019

cc @RalfJung

@alexcrichton
Copy link
Member

r=me on the technical side of things, so for language/rfc/whatnot

r? @RalfJung

@RalfJung
Copy link
Member

RalfJung commented Feb 14, 2019

Uh, sorry, I don't have any skin in this. It's all FFI stuff, which I know little about, and from my understanding it's mostly about taming LLVM's optimizer, which I know even less about.

Functions not being well-nested does have some deep consequences, but I guess there's no way we are going to rule this out entirely.

@RalfJung
Copy link
Member

Oh, and don't we usually wait until the RFC gets accepted before implementing it? Like, what if we land this and then the RFC gets rejected?

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 14, 2019

Like, what if we land this and then the RFC gets rejected?

We remove the feature and call it a day. AFAICT many unstable features are implemented all the time without nobody ever talking about actually RFCing the stuff. I want to use this in stable Rust at some point, so for that it definitely needs to go properly through the process (and the design space here is small, iff the intend is to do what C does in C FFI at least).

@RalfJung
Copy link
Member

shrug

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Feb 14, 2019

📌 Commit d0fddd3 has been approved by alexcrichton

@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 Feb 14, 2019
@bors
Copy link
Contributor

bors commented Feb 15, 2019

⌛ Testing commit d0fddd3 with merge aeb7d5db71b9e2554ae2f78d91442e872729d3ce...

@bors
Copy link
Contributor

bors commented Feb 15, 2019

💔 Test failed - checks-travis

@rust-highfive
Copy link
Collaborator

Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 15, 2019
@pietroalbini
Copy link
Member

@bors retry -- apparently we can't clone the repo anymore on macOS

@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 Feb 15, 2019
Centril added a commit to Centril/rust that referenced this pull request Feb 23, 2019
Implement unstable ffi_return_twice attribute

This PR implements [RFC2633](rust-lang/rfcs#2633)

r? @eddyb
@Centril
Copy link
Contributor

Centril commented Feb 23, 2019

Failed in #58664 (comment), @bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 23, 2019
@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 23, 2019

I guess another PR in the rollup also added the same error code? Or how did tidy fail there but not here?

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 23, 2019

@Centril all checks passed, can we give this another try?

@RalfJung
Copy link
Member

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Feb 24, 2019

📌 Commit 94aa740 has been approved by alexcrichton

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 24, 2019
@bors
Copy link
Contributor

bors commented Feb 24, 2019

⌛ Testing commit 94aa740 with merge 097c04c...

bors added a commit that referenced this pull request Feb 24, 2019
Implement unstable ffi_return_twice attribute

This PR implements [RFC2633](rust-lang/rfcs#2633)

r? @eddyb
@bors
Copy link
Contributor

bors commented Feb 24, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: alexcrichton
Pushing 097c04c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 24, 2019
@bors
Copy link
Contributor

bors commented Feb 24, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: alexcrichton
Pushing 097c04c to master...

@bors bors merged commit 94aa740 into rust-lang:master Feb 24, 2019
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants