Skip to content

Commit

Permalink
Remove doc about highlighting code in other languages #40301
Browse files Browse the repository at this point in the history
  • Loading branch information
projektir committed Mar 13, 2017
1 parent 824c9eb commit 0644773
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/doc/book/src/documentation.md
Expand Up @@ -183,24 +183,6 @@ To write some Rust code in a comment, use the triple graves:
# fn foo() {}
```

If you want something that's not Rust code, you can add an annotation:

```rust
/// ```c
/// printf("Hello, world\n");
/// ```
# fn foo() {}
```

This will highlight according to whatever language you're showing off.
If you're only showing plain text, choose `text`.

It's important to choose the correct annotation here, because `rustdoc` uses it
in an interesting way: It can be used to actually test your examples in a
library crate, so that they don't get out of date. If you have some C code but
`rustdoc` thinks it's Rust because you left off the annotation, `rustdoc` will
complain when trying to generate the documentation.

## Documentation as tests

Let's discuss our sample example documentation:
Expand Down

0 comments on commit 0644773

Please sign in to comment.