Skip to content

Commit

Permalink
Rollup merge of rust-lang#49994 - frewsxcv:frewsxcv-doc-tests, r=Quie…
Browse files Browse the repository at this point in the history
…tMisdreavus

Remove unnecessary indentation in rustdoc book codeblock.

None
  • Loading branch information
kennytm committed Apr 16, 2018
2 parents 87cd53e + afa22d6 commit 932431c
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/doc/rustdoc/src/documentation-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,31 +138,31 @@ To keep each code block testable, we want the whole program in each block, but
we don't want the reader to see every line every time. Here's what we put in
our source code:
```text
First, we set `x` to five:
``````markdown
First, we set `x` to five:
```
let x = 5;
# let y = 6;
# println!("{}", x + y);
```
```
let x = 5;
# let y = 6;
# println!("{}", x + y);
```
Next, we set `y` to six:
Next, we set `y` to six:
```
# let x = 5;
let y = 6;
# println!("{}", x + y);
```
```
# let x = 5;
let y = 6;
# println!("{}", x + y);
```
Finally, we print the sum of `x` and `y`:
Finally, we print the sum of `x` and `y`:
```
# let x = 5;
# let y = 6;
println!("{}", x + y);
```
```
# let x = 5;
# let y = 6;
println!("{}", x + y);
```
``````

By repeating all parts of the example, you can ensure that your example still
compiles, while only showing the parts that are relevant to that part of your
Expand Down

0 comments on commit 932431c

Please sign in to comment.