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.
This commit is contained in:
Robin Krahl 2018-05-18 14:09:15 +02:00
parent fd18d2537d
commit cf1f0385a8
No known key found for this signature in database
GPG key ID: 544DAA282D645673

View file

@ -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.