diff options
| author | Dmitrii - Demenev <demenev.dmitriy1@mail.ru> | 2022-01-09 19:17:15 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-09 19:17:15 -0500 |
| commit | 8fd8db5c2955dd715cf7ee59205a733abcdd34fc (patch) | |
| tree | 3750170034fcceddeca294bc2e1ca8e689645e79 | |
| parent | 092e1c9d23158d81be27bb6f71bdd0c6282478fb (diff) | |
| download | rust-8fd8db5c2955dd715cf7ee59205a733abcdd34fc.tar.gz rust-8fd8db5c2955dd715cf7ee59205a733abcdd34fc.zip | |
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 |
