From 81bf0b71a5a63840a661981dad19c1b317ba163e Mon Sep 17 00:00:00 2001 From: Kyle J Strand Date: Sun, 29 May 2022 10:45:31 -0600 Subject: [PATCH 1/2] PR review: parenthetical as part of sentence Co-authored-by: Yuki Okushi --- src/ffi.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ffi.md b/src/ffi.md index ae548c6..fd941a4 100644 --- a/src/ffi.md +++ b/src/ffi.md @@ -723,10 +723,10 @@ No `transmute` required! It’s important to be mindful of unwinding when working with FFI. Each non-`Rust` ABI comes in two variants, one with `-unwind` and one without. If you expect Rust `panic`s or foreign (e.g. C++) exceptions to cross an FFI -boundary, that boundary must use the appropriate `-unwind` ABI string. (Note +boundary, that boundary must use the appropriate `-unwind` ABI string (note that compiling with `panic=abort` will still cause `panic!` to immediately abort the process, regardless of which ABI is specified by the function that -`panic`s.) +`panic`s). Conversely, if you do not expect unwinding to cross an ABI boundary, use one of the non-`unwind` ABI strings (other than `Rust`, which always permits From dcf4dfdf491a9a4420c7919730abb8e187dd4228 Mon Sep 17 00:00:00 2001 From: Kyle J Strand Date: Sun, 29 May 2022 10:46:38 -0600 Subject: [PATCH 2/2] PR suggestion: phrasing Co-authored-by: Yuki Okushi --- src/ffi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ffi.md b/src/ffi.md index fd941a4..8057b96 100644 --- a/src/ffi.md +++ b/src/ffi.md @@ -721,7 +721,7 @@ No `transmute` required! ## FFI and unwinding It’s important to be mindful of unwinding when working with FFI. Each -non-`Rust` ABI comes in two variants, one with `-unwind` and one without. If +non-`Rust` ABI comes in two variants, one with `-unwind` suffix and one without. If you expect Rust `panic`s or foreign (e.g. C++) exceptions to cross an FFI boundary, that boundary must use the appropriate `-unwind` ABI string (note that compiling with `panic=abort` will still cause `panic!` to immediately