Skip to content

Commit b9c9cb8

Browse files
authored
Rollup merge of rust-lang#92707 - JohnScience:patch-1, r=GuillaumeGomez
Extended the note on the use of `no_run` attribute
2 parents 3c1e04f + 8fd8db5 commit b9c9cb8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
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)