Skip to content

Commit efc67f7

Browse files
Style tweaks from code review
Co-authored-by: Travis Cross <[email protected]>
1 parent af09649 commit efc67f7

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/behavior-considered-undefined.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ Please read the [Rustonomicon] before writing unsafe code.
7676
mechanisms outside Rust. Most assumptions of the Rust runtime are currently
7777
not explicitly documented.
7878
* For assumptions specifically related to unwinding, see [unwinding-ub].
79-
* Deallocating a Rust stack frame without executing destructors for local
80-
variables owned by the stack frame is always undefined. This can occur with
81-
C functions like `longjmp`.
79+
* The runtime assumes that a Rust stack frame is not deallocated without
80+
executing destructors for local variables owned by the stack frame. This assumption
81+
can be violated by C functions like `longjmp`.
8282

8383
> **Note**: Undefined behavior affects the entire program. For example, calling
8484
> a function in C that exhibits undefined behavior of C means your entire

src/items/functions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,13 @@ from the "Native unwind" column in the table.
244244
| panic runtime | ABI | `panic`-unwind | Native unwind (unforced) |
245245
| -------------- | ------------ | ------------------------------------- | ----------------------- |
246246
| `panic=unwind` | unwinding | unwind | unwind |
247-
| `panic=unwind` | non-unwinding | abort | [Undefined Behavior] |
247+
| `panic=unwind` | non-unwinding | abort | [undefined behavior] |
248248
| `panic=abort` | unwinding | `panic!` aborts (no unwinding occurs) | abort |
249-
| `panic=abort` | non-unwinding | `panic!` aborts (no unwinding occurs) | [Undefined Behavior] |
249+
| `panic=abort` | non-unwinding | `panic!` aborts (no unwinding occurs) | [undefined behavior] |
250250

251251
[panic-modes]: ../panic.md#panic-runtimes
252252
[forced-unwinding]: https://rust-lang.github.io/rfcs/2945-c-unwind-abi.html#forced-unwinding
253-
[Undefined Behavior]: ../behavior-considered-undefined.md
253+
[undefined behavior]: ../behavior-considered-undefined.md
254254

255255
## Const functions
256256

src/panic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ over panic behavior:
1111
runtime.
1212
* [FFI ABIs](items/functions.md#unwinding) may alter how panics behave.
1313

14-
> **Note**: The Standard Library provides the capability to explicitly panic
14+
> **Note**: The standard library provides the capability to explicitly panic
1515
> via the [`panic!` macro][macro-panic].
1616
1717
## Unwinding
@@ -31,7 +31,7 @@ if they had gone out of scope normally.
3131
> "unwinding" may be implemented without actually using the mechanism used by
3232
> C++ for the target platform.
3333
34-
> **Note**: The Standard Library provides two mechanisms for recovering from a panic,
34+
> **Note**: The standard library provides two mechanisms for recovering from a panic,
3535
> [`catch_unwind`][fn-catch-unwind] (which enables recovery within the
3636
> panicking thread) and [`JoinHandle::join`][thread-join] (which enables a process to
3737
> continue execution without recovering the panicked thread).

src/runtime.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn panic(info: &PanicInfo) -> ! {
4747

4848
The standard library provides an implementation of `panic_handler` that
4949
defaults to unwinding the stack but that can be [changed to abort the
50-
process][abort]. See also ["Panic runtimes"][panic-runtimes].
50+
process][abort]. See [panic runtimes] for more details.
5151

5252
The standard library's panic behavior can be modified at runtime with the
5353
[`set_hook` function][set_hook].
@@ -82,7 +82,7 @@ display a console window on startup. It will run detached from any existing cons
8282
[abort]: ../book/ch09-01-unrecoverable-errors-with-panic.html
8383
[attribute]: attributes.md
8484
[crate types]: linkage.md
85-
[panic-runtimes]: panic.md#panic-runtimes
85+
[panic runtimes]: panic.md#panic-runtimes
8686
[set_hook]: std::panic::set_hook
8787
[static item]: items/static-items.md
8888
[subsystem]: https://msdn.microsoft.com/en-us/library/fcc1zstk.aspx

0 commit comments

Comments
 (0)