Skip to content

Commit aa9d0ae

Browse files
committed
Tweak wording of "beyond rust main function"
This is to make it clear that the unwind is going *past* it, not just into it.
1 parent 6f81a5d commit aa9d0ae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/crates-and-source-files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ use foo::bar as main;
129129
r[crate.uncaught-foreign-unwinding]
130130

131131
When a "foreign" unwind (e.g. an exception thrown from C++ code, or a `panic!`
132-
in Rust code compiled or linked with a different runtime) is not caught before
133-
reaching the `main` function, the process will be safely terminated. This may
132+
in Rust code compiled or linked with a different runtime) propagates beyond
133+
the `main` function, the process will be safely terminated. This may
134134
take the form of an abort, in which case it is not guaranteed that any `Drop`
135135
calls will be executed, and the error output may be less informative than if the
136136
runtime had been terminated by a "native" Rust `panic`.

src/panic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ Unwinding with the wrong ABI is undefined behavior:
7777

7878
r[panic.unwind.ffi.catch-foreign]
7979
Catching a foreign unwinding operation (such as a C++ exception) using
80-
[`std::panic::catch_unwind`], [`std::thread::JoinHandle::join`], or by letting it propagate all the way to a
81-
Rust `main()` function will have one of two behaviors, and it is unspecified
80+
[`std::panic::catch_unwind`], [`std::thread::JoinHandle::join`], or by letting it propagate beyond the
81+
Rust `main()` function or thread root will have one of two behaviors, and it is unspecified
8282
which will occur:
8383
* The process aborts.
8484
* The function returns a [`Result::Err`] containing an opaque type.

0 commit comments

Comments
 (0)