File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,8 @@ scope of the expression with that operand. Since the temporaries are moved from
221221once the expression is evaluated, dropping them has no effect unless one of the
222222operands 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 {
Original file line number Diff line number Diff 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 -->
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments