@@ -2662,18 +2662,21 @@ extern "rust-intrinsic" {
26622662 pub fn discriminant_value < T > ( v : & T ) -> <T as DiscriminantKind >:: Discriminant ;
26632663
26642664 /// Rust's "try catch" construct for unwinding. Invokes the function pointer `try_fn` with the
2665- /// data pointer `data`, and calls `catch_fn` if a panic occurs while `try_fn` runs. It is
2666- /// undefined behavior to catch an unwinding operation from another language with this
2667- /// function.
2665+ /// data pointer `data`, and calls `catch_fn` if unwinding occurs while `try_fn` runs.
26682666 ///
26692667 /// `catch_fn` must not unwind.
26702668 ///
2671- /// The third argument is a function called if an unwind occurs (both Rust unwinds and foreign
2672- /// unwinds). This function takes the data pointer and a pointer to the target-specific
2673- /// exception object that was caught. For more information, see the compiler's source as well as
2674- /// std's `catch_unwind` implementation.
2669+ /// The third argument is a function called if an unwind occurs (both Rust `panic` and foreign
2670+ /// unwinds). This function takes the data pointer and a pointer to the target- and
2671+ /// runtime-specific exception object that was caught.
26752672 ///
2676- /// The stable version of this intrinsic is `std::panic::catch_unwind`.
2673+ /// Note that in the case of a foreign unwinding operation, the exception object data may not be
2674+ /// safely usable from Rust, and should not be directly exposed via the standard library. To
2675+ /// prevent unsafe access, the library implementation may either abort the process or present an
2676+ /// opaque error type to the user.
2677+ ///
2678+ /// For more information, see the compiler's source, as well as the documentation for the stable
2679+ /// version of this intrinsic, `std::panic::catch_unwind`.
26772680 #[ rustc_nounwind]
26782681 pub fn catch_unwind ( try_fn : fn ( * mut u8 ) , data : * mut u8 , catch_fn : fn ( * mut u8 , * mut u8 ) ) -> i32 ;
26792682
0 commit comments