Rollup merge of #50858 - robinkrahl:rustdoc-fix-order, r=steveklabnik
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:
commit
974396b991
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user