]> git.lizzy.rs Git - rust.git/commit
Clarify `Box<T>` representation and its use in FFI
authorStephane Raux <stephaneyfx@gmail.com>
Tue, 9 Jul 2019 04:34:36 +0000 (21:34 -0700)
committerStephane Raux <stephaneyfx@gmail.com>
Wed, 10 Jul 2019 03:40:16 +0000 (20:40 -0700)
commit318c5d6c963d0e5d8ece89e804b4e696c6011955
tree966d9f3394e165178e25c4390deb6c538ae0e9c1
parent09ab31bc64f4ede9f9498440cb4225c173767c1e
Clarify `Box<T>` representation and its use in FFI

This officializes what was only shown as a code example in [the unsafe code guidelines](https://rust-lang.github.io/unsafe-code-guidelines/layout/function-pointers.html?highlight=box#use) and follows [the discussion](https://github.com/rust-lang/unsafe-code-guidelines/issues/157) in the corresponding repository.

It is also related to [the issue](https://github.com/rust-lang/rust/issues/52976) regarding marking `Box<T>` `#[repr(transparent)]`.
src/liballoc/boxed.rs