Support Result<T, E> across FFI when niche optimization can be used (v2) by dtolnay · Pull Request #124747 · rust-lang/rust
added 9 commits
April 23, 2024 21:15Allow 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.
Couldn't find documentation supporting that single-variant
`#[repr(Rust)]` enums with RHS assigned work as expected with this
change.
```rust
enum Variants {
A = 17,
} // Would this be zero sized optimized guaranteed?
```
rustbot
added
S-waiting-on-review
labels
May 5, 2024
bors
added
S-waiting-on-bors
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
May 5, 2024bors added a commit to rust-lang-ci/rust that referenced this pull request
May 5, 2024Rollup of 6 pull requests Successful merges: - rust-lang#124146 (Triagebot: Rename `macos` ping group to `apple`) - rust-lang#124742 (Add `rustfmt` cfg to well known cfgs list) - rust-lang#124745 (Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) (v2)) - rust-lang#124747 (Support Result<T, E> across FFI when niche optimization can be used (v2)) - rust-lang#124765 ([rustdoc] Fix bad color for setting cog in ayu theme) - rust-lang#124768 ([resubmission] Meta: Enable the brand new triagebot transfer command) r? `@ghost` `@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request
May 6, 2024Rollup of 5 pull requests Successful merges: - rust-lang#124742 (Add `rustfmt` cfg to well known cfgs list) - rust-lang#124747 (Support Result<T, E> across FFI when niche optimization can be used (v2)) - rust-lang#124753 (Migrate `run-make/rustdoc-error-lines` to new `rmake.rs`) - rust-lang#124765 ([rustdoc] Fix bad color for setting cog in ayu theme) - rust-lang#124768 ([resubmission] Meta: Enable the brand new triagebot transfer command) r? `@ghost` `@rustbot` modify labels: rollup
dtolnay
removed
the
S-waiting-on-bors
label
Jan 14, 2025This 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