Extended the note on the use of no_run attribute

This commit is contained in:
Dmitrii - Demenev
2022-01-09 19:17:15 -05:00
committed by GitHub
parent 092e1c9d23
commit 8fd8db5c29
+2 -1
View File
@@ -335,7 +335,8 @@ panic during execution. If the code doesn't panic, the test will fail.
The `no_run` attribute will compile your code but not run it. This is
important for examples such as "Here's how to retrieve a web page,"
which you would want to ensure compiles, but might be run in a test
environment that has no network access.
environment that has no network access. This attribute can also be
used to demonstrate code snippets that can cause Undefined Behavior.
```rust
/// ```no_run