Skip to content

Commit 8b74efa

Browse files
committed
auto merge of #5852 : thestinger/rust/ffi, r=thestinger
2 parents 63e2724 + 53d2228 commit 8b74efa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/tutorial-ffi.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,11 @@ A `#[packed]` attribute is available, which will lay out the struct members with
186186
However, there are currently no guarantees about the layout of an `enum`.
187187

188188
Rust's owned and managed boxes use non-nullable pointers as handles which point to the contained
189-
object. However, they should not be manually because they are managed by internal allocators.
190-
Borrowed pointers can safely be assumed to be non-nullable pointers directly to the type. However,
191-
breaking the borrow checking or mutability rules is not guaranteed to be safe, so prefer using raw
192-
pointers (`*`) if that's needed because the compiler can't make as many assumptions about them.
189+
object. However, they should not be manually created because they are managed by internal
190+
allocators. Borrowed pointers can safely be assumed to be non-nullable pointers directly to the
191+
type. However, breaking the borrow checking or mutability rules is not guaranteed to be safe, so
192+
prefer using raw pointers (`*`) if that's needed because the compiler can't make as many assumptions
193+
about them.
193194

194195
Vectors and strings share the same basic memory layout, and utilities are available in the `vec` and
195196
`str` modules for working with C APIs. Strings are terminated with `\0` for interoperability with C,

0 commit comments

Comments
 (0)