diff options
| author | projektir <projektir@users.noreply.github.com> | 2017-03-13 00:14:42 -0400 |
|---|---|---|
| committer | projektir <projektir@users.noreply.github.com> | 2017-03-13 00:14:42 -0400 |
| commit | 064477391c086d4ea26d880bc0f5e1a5c4cb1383 (patch) | |
| tree | 5ea18ef825872529ed6c892af4f7cf15ecbe5493 | |
| parent | 824c9ebbd5f0611e326648d90ee3e50caf04bb7f (diff) | |
Remove doc about highlighting code in other languages #40301
| -rw-r--r-- | src/doc/book/src/documentation.md | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/doc/book/src/documentation.md b/src/doc/book/src/documentation.md index 69d49e2f96a..551c393be77 100644 --- a/src/doc/book/src/documentation.md +++ b/src/doc/book/src/documentation.md @@ -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: |
