Skip to content

Commit

Permalink
Add precision for rustdoc block codes
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Sep 3, 2017
1 parent 2ffcfeb commit ebc195d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/doc/rustdoc/src/documentation-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ebc195d

Please sign in to comment.