Support Result<T, E> across FFI when niche optimization can be used by MasterAwesome · Pull Request #122253 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation26 Commits9 Checks18 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

MasterAwesome

Allow allow enums like Result<T, E> to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe.

Implementation of rust-lang/rfcs#3391
Tracking issue: #110503

Additional ABI and codegen tests were added in #115372

@rustbot

r? @cjgillot

rustbot has assigned @cjgillot.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Mar 9, 2024

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@cjgillot

@petrochenkov

@RalfJung

Sorry, I can't review these lint implementations.
Maybe r? @davidtwco ; I see you've worked on the improper-ctypes lint in the past.

davidtwco

@rustbot rustbot 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-review

Status: Awaiting review from the assignee but also interested parties.

labels

Mar 18, 2024

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Mar 19, 2024

@bors

davidtwco

Choose a reason for hiding this comment

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

r=me after rebasing

@MasterAwesome

Allow allow enums like Result<T, E> to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe.

@MasterAwesome

Fields are disallowed so checking the top attribute is enough.

@MasterAwesome

@MasterAwesome

@MasterAwesome

@MasterAwesome

@bors

@MasterAwesome

I guess I don't have permissions @davidtwco, can you queue this in?

@Dylan-DPC

@bors

📌 Commit ed532cc has been approved by davidtwco

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

May 1, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

May 1, 2024

@bors

Support Result<T, E> across FFI when niche optimization can be used

Allow allow enums like Result<T, E> to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe.

Implementation of rust-lang/rfcs#3391 Tracking issue: rust-lang#110503

Additional ABI and codegen tests were added in rust-lang#115372

@fmease

fmease added a commit to fmease/rust that referenced this pull request

May 5, 2024

@fmease

Support Result<T, E> across FFI when niche optimization can be used

Allow allow enums like Result<T, E> to be used across FFI if the T/E can be niche optimized and the non-niche-optimized type is FFI safe.

Implementation of rust-lang/rfcs#3391 Tracking issue: rust-lang#110503

Additional ABI and codegen tests were added in rust-lang#115372

bors added a commit to rust-lang-ci/rust that referenced this pull request

May 5, 2024

@bors

Rollup of 7 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

May 5, 2024

@bors

Rollup of 7 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

@bors

@bors

@Kobzol

This PR has been merged by accident, without the full test suite being run. It was my fault (#124631 got merged and it broke our CI). @MasterAwesome Could you please create a new PR with your branch against the latest version of origin/master? Thank you, and sorry for the mess.

@dtolnay

New PR, from the same branch: #124747

fmease added a commit to fmease/rust that referenced this pull request

May 5, 2024

@fmease

fmease added a commit to fmease/rust that referenced this pull request

May 5, 2024

@fmease

bors added a commit to rust-lang-ci/rust that referenced this pull request

May 6, 2024

@bors

@dtolnay dtolnay added the A-FFI

Area: Foreign function interface (FFI)

label

Jan 14, 2025

Labels

A-FFI

Area: Foreign function interface (FFI)

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-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.