We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ffcfeb commit ebc195dCopy full SHA for ebc195d
src/doc/rustdoc/src/documentation-tests.md
@@ -16,6 +16,19 @@ The basic idea is this:
16
The triple backticks start and end code blocks. If this were in a file named `foo.rs`,
17
running `rustdoc --test foo.rs` will extract this example, and then run it as a test.
18
19
+Please note that by default, if no language is set for the block code, `rustdoc`
20
+assumes it is `Rust` code. So the following:
21
+
22
+```rust
23
+let x = 5;
24
+```
25
26
+is strictly equivalent to:
27
28
29
30
31
32
There's some subtlety though! Read on for more details.
33
34
## Pre-processing examples
0 commit comments