Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 91b8465

Browse files
Aaron1011mark-i-m
andauthoredDec 2, 2019
Apply some fixes
Co-Authored-By: Who? Me?! <mark-i-m@users.noreply.github.com>
1 parent 3409840 commit 91b8465

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

‎src/panic-implementation.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn rust_begin_panic(info: &PanicInfo<'_>) -> ! {
4444
```
4545

4646
The special `panic_handler` attribute is resolved via `src/librustc/middle/lang_items`.
47-
The `extract` functions convers the `panic_handler` attribute to a `panic_impl` lang item.
47+
The `extract` function converts the `panic_handler` attribute to a `panic_impl` lang item.
4848

4949
Now, we have a matching `panic_impl` lang item in the `libstd`. This function goes
5050
through the same process as the `extern { fn panic_impl }` definition in `libcore`, ending
@@ -59,7 +59,7 @@ to go through the same infratructure that other panics use (panic hooks, unwindi
5959

6060
This is where the actual panic-related logic begins. In `src/libstd/pancking.rs`,
6161
control passes to `rust_panic_with_hook`. This method is responsible
62-
for checking for invoking the global panic hook, and checking for double panics. Finally,
62+
for invoking the global panic hook, and checking for double panics. Finally,
6363
we call ```__rust_start_panic```, which is provided by the panic runtime.
6464

6565
The call to ```__rust_start_panic``` is very weird - it is passed a ```*mut &mut dyn BoxMeUp```,
@@ -101,5 +101,4 @@ with each frame (currently, running destructors), and transferring control
101101
to the `catch_unwind` frame.
102102

103103
Note that all panics either abort the process or get caught by some call to `catch_unwind`:
104-
in `src/libstd/rt.rs`, the call to the user-provided `main` function is wrapped in `catch_unwind
105-
104+
in `src/libstd/rt.rs`, the call to the user-provided `main` function is wrapped in `catch_unwind`.

0 commit comments

Comments
 (0)
Please sign in to comment.