Skip to content

Commit b8a95d3

Browse files
committed
Use built-in std linking
1 parent cefb1ec commit b8a95d3

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/panic.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ over panic behavior:
2121

2222
> [!NOTE]
2323
> The standard library provides the capability to explicitly panic
24-
> via the [`panic!` macro][macro-panic].
24+
> via the [`panic!` macro][panic!].
2525
2626
## Unwinding
2727

@@ -49,8 +49,8 @@ just as if they had gone out of scope normally.
4949
5050
> [!NOTE]
5151
> The standard library provides two mechanisms for recovering from a panic,
52-
> [`catch_unwind`][fn-catch-unwind] (which enables recovery within the
53-
> panicking thread) and [`thread::spawn`][thread-spawn] (which automatically
52+
> [`std::panic::catch_unwind`] (which enables recovery within the
53+
> panicking thread) and [`std::thread::spawn`] (which automatically
5454
> sets up panic recovery for the spawned thread so that other threads may
5555
> continue running).
5656
@@ -77,11 +77,11 @@ 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-
`catch_unwind`, `JoinHandle::join`, or by letting it propagate all the way to a
80+
[`std::panic::catch_unwind`], [`std::thread::JoinHandle::join`], or by letting it propagate all the way to a
8181
Rust `main()` function will have one of two behaviors, and it is unspecified
8282
which will occur:
8383
* The process aborts.
84-
* The function returns a `Result::Err` containing an opaque type.
84+
* The function returns a [`Result::Err`] containing an opaque type.
8585

8686
> [!NOTE]
8787
> Rust code compiled or linked with a different instance of the Rust runtime counts as a
@@ -120,8 +120,5 @@ See also the [`panic_handler` attribute](runtime.md#the-panic_handler-attribute)
120120

121121
[array indexing]: expressions/array-expr.md#array-and-slice-indexing-expressions
122122
[destructors]: destructors.md
123-
[fn-catch-unwind]: ../std/panic/fn.catch_unwind.html
124-
[macro-panic]: ../std/macro.panic.html
125123
[runtime]: runtime.md
126-
[thread-spawn]: ../std/thread/fn.spawn.html
127124
[unwind-abi]: items/functions.md#unwinding

0 commit comments

Comments
 (0)