Add precision for rustdoc block codes
This commit is contained in:
parent
2ffcfeb821
commit
ebc195d292
|
@ -16,6 +16,19 @@ The basic idea is this:
|
|||
The triple backticks start and end code blocks. If this were in a file named `foo.rs`,
|
||||
running `rustdoc --test foo.rs` will extract this example, and then run it as a test.
|
||||
|
||||
Please note that by default, if no language is set for the block code, `rustdoc`
|
||||
assumes it is `Rust` code. So the following:
|
||||
|
||||
```rust
|
||||
let x = 5;
|
||||
```
|
||||
|
||||
is strictly equivalent to:
|
||||
|
||||
```
|
||||
let x = 5;
|
||||
```
|
||||
|
||||
There's some subtlety though! Read on for more details.
|
||||
|
||||
## Pre-processing examples
|
||||
|
|
Loading…
Reference in New Issue