Skip to content

Commit 94bb6a6

Browse files
authored
Copyedits to FFI and unwinding section
These are minor changes that make the text flow better to me.
1 parent 960d610 commit 94bb6a6

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/ffi.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -722,16 +722,19 @@ No `transmute` required!
722722
## FFI and unwinding
723723
724724
It’s important to be mindful of unwinding when working with FFI. Each
725-
non-`Rust` ABI comes in two variants, one with `-unwind` suffix and one without. If
726-
you expect Rust `panic`s or foreign (e.g. C++) exceptions to cross an FFI
727-
boundary, that boundary must use the appropriate `-unwind` ABI string (note
728-
that compiling with `panic=abort` will still cause `panic!` to immediately
729-
abort the process, regardless of which ABI is specified by the function that
730-
`panic`s).
725+
ABI comes in two variants, one with `-unwind` suffix and one without (except
726+
the `Rust` ABI, which always permits unwinding).
731727
728+
If you expect Rust `panic`s or foreign (e.g. C++) exceptions to cross an FFI
729+
boundary, that boundary must use the appropriate `-unwind` ABI string.
732730
Conversely, if you do not expect unwinding to cross an ABI boundary, use one of
733-
the non-`unwind` ABI strings (other than `Rust`, which always permits
734-
unwinding). If an unwinding operation does encounter an ABI boundary that is
731+
the non-`unwind` ABI strings.
732+
733+
> Note: Compiling with `panic=abort` will still cause `panic!` to immediately
734+
abort the process, regardless of which ABI is specified by the function that
735+
`panic`s.
736+
737+
If an unwinding operation does encounter an ABI boundary that is
735738
not permitted to unwind, the behavior depends on the source of the unwinding
736739
(Rust `panic` or a foreign exception):
737740

0 commit comments

Comments
 (0)