Skip to content

Commit 8fd8db5

Browse files
authored
Extended the note on the use of no_run attribute
1 parent 092e1c9 commit 8fd8db5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/doc/rustdoc/src/documentation-tests.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ panic during execution. If the code doesn't panic, the test will fail.
335335
The `no_run` attribute will compile your code but not run it. This is
336336
important for examples such as "Here's how to retrieve a web page,"
337337
which you would want to ensure compiles, but might be run in a test
338-
environment that has no network access.
338+
environment that has no network access. This attribute can also be
339+
used to demonstrate code snippets that can cause Undefined Behavior.
339340

340341
```rust
341342
/// ```no_run

0 commit comments

Comments
 (0)