Skip to content

Commit 3475019

Browse files
BatmanAoDehuss
andcommitted
Apply suggestions from code review
Links and 'note's Co-authored-by: Eric Huss <eric@huss.org>
1 parent 0538d37 commit 3475019

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/items/functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ implementation.
222222
| panic runtime | ABI | `panic`-unwind | Foreign unwind (unforced) |
223223
| -------------- | ------------ | ------------------------------------- | ----------------------- |
224224
| `panic=unwind` | `"C-unwind"` | unwind | unwind |
225-
| `panic=unwind` | `"C"` | abort | UB |
225+
| `panic=unwind` | `"C"` | abort | [Undefined Behavior] |
226226
| `panic=abort` | `"C-unwind"` | `panic!` aborts (no unwinding occurs) | abort |
227-
| `panic=abort` | `"C"` | `panic!` aborts (no unwinding occurs) | UB |
227+
| `panic=abort` | `"C"` | `panic!` aborts (no unwinding occurs) | [Undefined Behavior] |
228228

229229
> **Note**: The LLVM backend of the `rustc` implementation
230230
> aborts the process by executing an illegal instruction.

src/linkage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ both of the following characteristics:
221221

222222
`rustc` enforces this restriction at link-time. To guarantee that
223223
a library will be linkable regardless of the panic mode used at
224-
link-time, the `ffi_unwind_calls` may be used. The lint flags any
224+
link-time, the [`ffi_unwind_calls` lint] may be used. The lint flags any
225225
calls to `-unwind` foreign functions or function pointers.
226226

227227
Note: Cargo will automatically unify all crates to use the same `panic`

src/panic.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ panic traverses Rust frames, live objects in those frames that [implement
2020
recovery does occur (for instance at a thread boundary), the objects will have
2121
been "cleaned up" just as if they had gone out of scope normally.
2222

23-
> As long as this guarantee of resource-cleanup is preserved, "unwinding" may
23+
> **Note**: As long as this guarantee of resource-cleanup is preserved, "unwinding" may
2424
> be implemented without actually using the mechanism used by C++ for the
2525
> target platform.
2626
27-
> The Standard Library provides two mechanisms for recovering from a panic,
27+
> **Note**: The Standard Library provides two mechanisms for recovering from a panic,
2828
> [`catch_unwind`][fn-catch-unwind] (which enables recovery within the
2929
> panicking thread) and [`JoinHandle::join`][thread-join] (which enables a process to
3030
> continue execution without recovering the panicked thread).
@@ -34,7 +34,7 @@ been "cleaned up" just as if they had gone out of scope normally.
3434
The actual behavior and implementation of `panic!` is controlled by the _panic
3535
runtime_.
3636

37-
> The Rust standard library provides two panic runtimes: `panic_unwind` (the
37+
> **Note**: The Rust standard library provides two panic runtimes: `panic_unwind` (the
3838
> default) and `panic_abort`, which immediately aborts the process (which is
3939
> non-recoverable).
4040

0 commit comments

Comments
 (0)