Skip to content

Commit 6ce66b4

Browse files
committed
Fix identifeirs in functions.md and move the guarantee about destructor execution out of a note
1 parent d1339c4 commit 6ce66b4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/items/functions.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,13 @@ let fptr: extern "C" fn() -> i32 = new_i32;
258258

259259
r[items.fn.extern.unwind]
260260

261-
r[items.fn.extern.unwind.into]
261+
r[items.fn.extern.unwind.info]
262262
Most ABI strings come in two variants, one with an `-unwind` suffix and one without.
263263
The `Rust` ABI always permits unwinding, so there is no `Rust-unwind` ABI. The
264264
choice of ABI, together with the runtime [panic mode][panic-modes], determines
265265
the behavior when unwinding out of a function.
266266

267+
r[items.fn.extern.unwind.behavior]
267268
The table below indicates the behavior of an unwinding operation reaching each
268269
type of ABI boundary (function declaration or definition using the
269270
corresponding ABI string). Note that the Rust runtime is not affected by, and
@@ -294,10 +295,12 @@ from the "Native unwind" column in the table.
294295
| `panic=abort` | unwinding | `panic` aborts without unwinding | abort |
295296
| `panic=abort` | non-unwinding | `panic` aborts without unwinding | [undefined behavior] |
296297

297-
> **Note**: The following guarantee applies from Rust 1.82 onward: with
298-
> `panic=unwind`, when a `panic` is turned into an abort by a non-unwinding
299-
> ABI boundary, either no destructors (`Drop` calls) will run, or all destructors
300-
> up until the ABI boundary will run.
298+
r[items.fn.extern.abort]
299+
With `panic=unwind`, when a `panic` is turned into an abort by a non-unwinding ABI boundary, either no destructors (`Drop` calls) will run, or all destructors
300+
up until the ABI boundary will run.
301+
302+
> [!NOTE]
303+
> Prior to Rust 1.82, it is possible for only some of the destructors to executive, and not others.
301304
302305
For other considerations and limitations regarding unwinding across FFI
303306
boundaries, see the [relevant section in the Panic documentation][panic-ffi].

0 commit comments

Comments
 (0)