Skip to content

Commit 267f815

Browse files
authored
Add files via upload
1 parent 464866f commit 267f815

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/conditional-compilation.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,15 @@ production. For example, it controls the behavior of the standard library's
208208
Set when the crate being compiled is being compiled with the `proc_macro`
209209
[crate type].
210210

211+
### `panic`
212+
213+
Key-value option set depending on the panic strategy. Note that more values may be added in the future.
214+
215+
Example values:
216+
217+
* `"abort"`
218+
* `"unwind"`
219+
211220
## Forms of conditional compilation
212221

213222
### The `cfg` attribute
@@ -260,12 +269,6 @@ fn when_unwinding() {
260269
// ...
261270
}
262271

263-
// This function is only included when the panic strategy is not set to unwind
264-
#[cfg(not(panic="unwind"))]
265-
fn when_aborting() {
266-
// ...
267-
}
268-
269272
```
270273

271274
The `cfg` attribute is allowed anywhere attributes are allowed.

0 commit comments

Comments
 (0)