We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09eadce commit 14bb695Copy full SHA for 14bb695
src/conditional-compilation.md
@@ -253,6 +253,19 @@ fn on_32bit_unix() {
253
fn needs_not_foo() {
254
// ...
255
}
256
+
257
+// This function is only included when the panic strategy is set to unwind
258
+#[cfg(panic = "unwind")]
259
+fn when_unwinding() {
260
+ // ...
261
+}
262
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
269
```
270
271
The `cfg` attribute is allowed anywhere attributes are allowed.
0 commit comments