From 8fd8db5c2955dd715cf7ee59205a733abcdd34fc Mon Sep 17 00:00:00 2001 From: Dmitrii - Demenev Date: Sun, 9 Jan 2022 19:17:15 -0500 Subject: [PATCH] Extended the note on the use of `no_run` attribute --- src/doc/rustdoc/src/documentation-tests.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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