@@ -721,17 +721,20 @@ No `transmute` required!
721
721
722
722
## FFI and unwinding
723
723
724
- 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).
724
+ It’s important to be mindful of unwinding when working with FFI. Most
725
+ ABI strings come in two variants, one with an `-unwind` suffix and one without.
726
+ The `Rust` ABI always permits unwinding, so there is no `Rust-unwind` ABI.
731
727
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.
732
730
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
735
738
not permitted to unwind, the behavior depends on the source of the unwinding
736
739
(Rust `panic` or a foreign exception):
737
740
0 commit comments