Skip to content

Commit 3e2faa1

Browse files
authored
Update testing.md
1 parent 7ab0aa0 commit 3e2faa1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/attributes/testing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ fn mytest() {
8585

8686
The `cfg_panic` feature makes it possible to exercise different lines of code depending on the panic strategy.
8787
The possible value is either `unwind` or `abort`.
88+
8889
The following is a playful example on choosing the right beverage.
8990

9091
```rust
@@ -124,6 +125,9 @@ fn main() {
124125
}
125126
```
126127

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`.
130+
127131
[_MetaListNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
128132
[_MetaNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
129133
[`Termination`]: ../../std/process/trait.Termination.html

0 commit comments

Comments
 (0)