@@ -311,16 +311,18 @@ where
311311///
312312/// # Notes
313313///
314- /// Note that this function **might not catch all panics** in Rust. A panic in
315- /// Rust is not always implemented via unwinding, but can be implemented by
316- /// aborting the process as well. This function *only* catches unwinding panics,
317- /// not those that abort the process.
318- ///
319- /// Note that if a custom panic hook has been set, it will be invoked before
320- /// the panic is caught, before unwinding.
321- ///
322- /// Also note that unwinding into Rust code with a foreign exception (e.g.
323- /// an exception thrown from C++ code) is undefined behavior.
314+ /// This function **might not catch all panics** in Rust. A panic in Rust is not
315+ /// always implemented via unwinding, but can be implemented by aborting the
316+ /// process as well. This function *only* catches unwinding panics, not those
317+ /// that abort the process.
318+ ///
319+ /// If a custom panic hook has been set, it will be invoked before the panic is
320+ /// caught, before unwinding.
321+ ///
322+ /// Although unwinding into Rust code with a foreign exception (e.g. an
323+ /// exception thrown from C++ code) via an appropriate ABI (e.g. `"C-unwind"`)
324+ /// is permitted, catching such an exception using this function is undefined
325+ /// behavior.
324326///
325327/// Finally, be **careful in how you drop the result of this function**.
326328/// If it is `Err`, it contains the panic payload, and dropping that may in turn panic!
0 commit comments