about summary refs log tree commit diff
path: root/src/doc/rustdoc
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2018-05-18 14:09:15 +0200
committerRobin Krahl <me@robin-krahl.de>2018-05-18 14:12:25 +0200
commitcf1f0385a89a87fbe1ca21bf6fc4fea6bdf36365 (patch)
treefd3523a3f92a8f80f2d57849e44e0469a8536665 /src/doc/rustdoc
parentfd18d2537ddcffb24b3739393b085ed28dfc340e (diff)
downloadrust-cf1f0385a89a87fbe1ca21bf6fc4fea6bdf36365.tar.gz
rust-cf1f0385a89a87fbe1ca21bf6fc4fea6bdf36365.zip
Reorder description for snippets in rustdoc documentation
The example code snippets for the `no_run` and `compile_fail` attributes
in the rustdoc documentation were followed by the description for the
wrong attribute.  This patch reorders the descriptions to match the code
snippets.
Diffstat (limited to 'src/doc/rustdoc')
-rw-r--r--src/doc/rustdoc/src/documentation-tests.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/doc/rustdoc/src/documentation-tests.md b/src/doc/rustdoc/src/documentation-tests.md
index 3098587a8a4..fd7d1713ca5 100644
--- a/src/doc/rustdoc/src/documentation-tests.md
+++ b/src/doc/rustdoc/src/documentation-tests.md
@@ -268,10 +268,10 @@ not actually pass as a test.
 # fn foo() {}
 ```
 
-`compile_fail` tells `rustdoc` that the compilation should fail. If it
-compiles, then the test will fail. However please note that code failing
-with the current Rust release may work in a future release, as new features
-are added.
+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.
 
 ```text
 /// ```compile_fail
@@ -280,7 +280,7 @@ are added.
 /// ```
 ```
 
-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.
+`compile_fail` tells `rustdoc` that the compilation should fail. If it
+compiles, then the test will fail. However please note that code failing
+with the current Rust release may work in a future release, as new features
+are added.