Skip to content

Commit fc8af98

Browse files
nico-abramMark-Simulacrum
authored andcommitted
Document Box<T> FFI guarantee in 1.41.0 release notes
Fixes #68676
1 parent 89b9f7b commit fc8af98

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

RELEASES.md

+6
Original file line numberDiff line numberDiff line change
@@ -2588,6 +2588,11 @@ Language
25882588
- [Visibility modifiers (e.g. `pub`) are now syntactically allowed on trait items and
25892589
enum variants.][66183] These are still rejected semantically, but
25902590
can be seen and parsed by procedural macros and conditional compilation.
2591+
- [You can now define a Rust `extern "C"` function with `Box<T>` and use `T*` as the corresponding
2592+
type on the C side.][62514] Please see [the documentation][box-memory-layout] for more information,
2593+
including the important caveat about preferring to avoid `Box<T>` in Rust signatures for functions defined in C.
2594+
2595+
[box-memory-layout]: https://doc.rust-lang.org/std/boxed/index.html#memory-layout
25912596

25922597
Compiler
25932598
--------
@@ -2662,6 +2667,7 @@ Compatibility Notes
26622667

26632668
[54733]: https://github.com/rust-lang/rust/pull/54733/
26642669
[61351]: https://github.com/rust-lang/rust/pull/61351/
2670+
[62514]: https://github.com/rust-lang/rust/pull/62514/
26652671
[67255]: https://github.com/rust-lang/rust/pull/67255/
26662672
[66661]: https://github.com/rust-lang/rust/pull/66661/
26672673
[66771]: https://github.com/rust-lang/rust/pull/66771/

0 commit comments

Comments
 (0)