Skip to content

Commit b0db9f2

Browse files
author
Kyle Strand
committed
not sure how to fill in panic runtime bit
1 parent 0b3b4ed commit b0db9f2

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

src/destructors.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ scope of the expression with that operand. Since the temporaries are moved from
221221
once the expression is evaluated, dropping them has no effect unless one of the
222222
operands to an expression breaks out of the expression, returns, or panics.
223223

224+
<!-- XXX note about panic=abort here? -->
225+
224226
```rust
225227
# struct PrintOnDrop(&'static str);
226228
# impl Drop for PrintOnDrop {

src/linkage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ both of the following characteristics:
219219
* It contains a call to an `-unwind` foreign function or function pointer
220220
* It was compiled with `panic=unwind`
221221

222-
Note: `cargo` will automatically unify all crates to use the same `panic`
223-
runtime, so this prohibition does not apply to projects compiled with `cargo`.
222+
Note: Cargo will automatically unify all crates to use the same `panic`
223+
runtime, so this prohibition does not apply to projects compiled with Cargo.
224224

225225
<!-- TODO: edit the above to indicate that this prohibition is enforced by
226226
`rustc` once https://github.com/rust-lang/rust/pull/97235 has been merged -->

src/panic-runtime.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Panic runtimes
22

3-
XXX fill me in... then link here from `FFI` and `linkage` pages
3+
XXX fill me in...
4+
5+
`rustc` option: `-C panic=<foo>`
46

57
`panic=abort`
6-
`panic=unwind`
8+
`panic=unwind` (default)
9+
10+
With `panic=abort`:
11+
* Cleanup code (`Drop`) can't be called
12+
* Panics can't be caught with `catch_unwind`
13+
14+
Cargo unifies panic runtimes

0 commit comments

Comments
 (0)