Skip to content

Commit

Permalink
Rollup merge of #92707 - JohnScience:patch-1, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
Extended the note on the use of `no_run` attribute
  • Loading branch information
matthiaskrgr authored Jan 12, 2022
2 parents 4f31c5c + 8fd8db5 commit cfb9306
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/doc/rustdoc/src/documentation-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cfb9306

Please sign in to comment.