Skip to content

Commit 9dff73d

Browse files
chorman0773ehuss
authored andcommitted
Fix identifeirs in functions.md and move the guarantee about destructor execution out of a note
1 parent 6857497 commit 9dff73d

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
@@ -257,12 +257,13 @@ let fptr: extern "C" fn() -> i32 = new_i32;
257257

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

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

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

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

0 commit comments

Comments
 (0)