Skip to content

Commit bae62c9

Browse files
authored
Merge pull request #1505 from cchiw/master
Update abort_unwind.md
2 parents 900e0d7 + d73f505 commit bae62c9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/error/abort_unwind.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# `abort` and `unwind`
22

3-
The previous section illustrates the error handling mechanism `panic`. The `cfg_panic` feature makes it possible to execute different code depending on the panic strategy. The current values available are `unwind` and `abort`.
3+
The previous section illustrates the error handling mechanism `panic`. Different code paths can be conditionally compiled based on the panic setting. The current values available are `unwind` and `abort`.
44

55

66
Building on the prior lemonade example, we explicitly use the panic strategy to execise different lines of code.
77

8-
```rust,editable,ignore,mdbook-runnable
8+
```rust,editable,mdbook-runnable
99
1010
fn drink(beverage: &str) {
1111
// You shouldn't drink too much sugary beverages.
@@ -24,7 +24,7 @@ fn main() {
2424

2525
Here is another example focusing on rewriting `drink()` and explicitly use the `unwind` keyword.
2626

27-
```rust,editable,ignore
27+
```rust,editable
2828
2929
#[cfg(panic = "unwind")]
3030
fn ah(){ println!("Spit it out!!!!");}
@@ -45,7 +45,7 @@ fn main() {
4545

4646
The panic strategy can be set from the command line by using `abort` or `unwind`.
4747

48-
```rust,editable,ignore
49-
rustc lemonade.rc -C panic=abort
48+
```console
49+
rustc lemonade.rs -C panic=abort
5050
```
5151

0 commit comments

Comments
 (0)