Skip to content

Commit 937e6c6

Browse files
authored
Rollup merge of rust-lang#138773 - RalfJung:catch_unwind_docs, r=jhpratt
catch_unwind intrinsic: document return value Seems like we forgot to document this. The comment reflects what Miri does, which seems to also match what codegen does at least [in `codegen_gnu_try`](https://github.com/rust-lang/rust/blob/b754ef727ca87050a8d758fc44f524cfb4310eff/compiler/rustc_codegen_llvm/src/intrinsic.rs#L953-L964).
2 parents dce403d + 6857c8d commit 937e6c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/intrinsics/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3002,6 +3002,7 @@ pub const fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discrimina
30023002

30033003
/// Rust's "try catch" construct for unwinding. Invokes the function pointer `try_fn` with the
30043004
/// data pointer `data`, and calls `catch_fn` if unwinding occurs while `try_fn` runs.
3005+
/// Returns `1` if unwinding occurred and `catch_fn` was called; returns `0` otherwise.
30053006
///
30063007
/// `catch_fn` must not unwind.
30073008
///

0 commit comments

Comments
 (0)