Skip to content

Commit 8c5964e

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 842af8c commit 8c5964e

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
@@ -126,8 +126,8 @@ r[crate.uncaught-foreign-unwinding]
126126
### Uncaught foreign unwinding
127127

128128
When a "foreign" unwind (e.g. an exception thrown from C++ code, or a `panic!`
129-
in Rust code compiled or linked with a different runtime) is not caught before
130-
reaching the `main` function, the process will be safely terminated. This may
129+
in Rust code compiled or linked with a different runtime) propagates beyond
130+
the `main` function, the process will be safely terminated. This may
131131
take the form of an abort, in which case it is not guaranteed that any `Drop`
132132
calls will be executed, and the error output may be less informative than if the
133133
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)