You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/attributes/testing.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,7 @@ fn mytest() {
85
85
86
86
The `cfg_panic` feature makes it possible to exercise different lines of code depending on the panic strategy.
87
87
The possible value is either `unwind` or `abort`.
88
+
88
89
The following is a playful example on choosing the right beverage.
89
90
90
91
```rust
@@ -124,6 +125,9 @@ fn main() {
124
125
}
125
126
```
126
127
128
+
Note that when the code is compiled with a certain panic strategy it still might do something different if a crate was compiled with a different strategy.
129
+
For instance, if `#[cfg(panic = "unwind")]` is set to `true` and a crate is compiled with`-C panic=abort`.
0 commit comments