diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-12 07:12:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-12 07:12:11 +0100 |
| commit | cfb9306ef9ce515c9c063d1dcc37d2f47dd6f414 (patch) | |
| tree | db64a4b1c392e8605abaa7b25f4c48f93793b9d3 | |
| parent | 4f31c5c130a486693d0957b55f167b4792698a1d (diff) | |
| parent | 8fd8db5c2955dd715cf7ee59205a733abcdd34fc (diff) | |
| download | rust-cfb9306ef9ce515c9c063d1dcc37d2f47dd6f414.tar.gz rust-cfb9306ef9ce515c9c063d1dcc37d2f47dd6f414.zip | |
Rollup merge of #92707 - JohnScience:patch-1, r=GuillaumeGomez
Extended the note on the use of `no_run` attribute
| -rw-r--r-- | src/doc/rustdoc/src/documentation-tests.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/doc/rustdoc/src/documentation-tests.md b/src/doc/rustdoc/src/documentation-tests.md index aea55d4f4b6..534fd19b52e 100644 --- a/src/doc/rustdoc/src/documentation-tests.md +++ b/src/doc/rustdoc/src/documentation-tests.md @@ -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 |
