about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-03-17 08:48:55 -0400
committerGitHub <noreply@github.com>2017-03-17 08:48:55 -0400
commit127c3ad362614eac5d3dca83026d35e65d9a4cfe (patch)
tree97946e1e1c44f787eb5fcebaafb375aeffcf72be
parentcfca6fccb9304cbc943c5be117d1ac1afceb0545 (diff)
parenteb203d597f6bed9bb6a7103649a36f19a087a2ab (diff)
downloadrust-127c3ad362614eac5d3dca83026d35e65d9a4cfe.tar.gz
rust-127c3ad362614eac5d3dca83026d35e65d9a4cfe.zip
Rollup merge of #40466 - projektir:outdated_docs_highlighting, r=steveklabnik
Remove doc about highlighting code in other languages #40301

This doesn't appear to be true any longer, so removing it to avoid confusion. See #40301

Thoughts:
- may be a good idea to remove "Let's discuss the details of these code blocks.", as there's not much being discussed at this point;
- does `text` still work?

r? @steveklabnik
-rw-r--r--src/doc/book/src/documentation.md21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/doc/book/src/documentation.md b/src/doc/book/src/documentation.md
index 69d49e2f96a..176a7e508c0 100644
--- a/src/doc/book/src/documentation.md
+++ b/src/doc/book/src/documentation.md
@@ -170,8 +170,6 @@ more than one section:
 # fn foo() {}
 ```
 
-Let's discuss the details of these code blocks.
-
 #### Code block annotations
 
 To write some Rust code in a comment, use the triple graves:
@@ -183,23 +181,8 @@ 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.
+This will add code highlighting. If you are only showing plain text, put `text`
+instead of `rust` after the triple graves (see below).
 
 ## Documentation as tests