Skip to content

Commit 0644773

Browse files
committed
Remove doc about highlighting code in other languages #40301
1 parent 824c9eb commit 0644773

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/doc/book/src/documentation.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -183,24 +183,6 @@ To write some Rust code in a comment, use the triple graves:
183183
# fn foo() {}
184184
```
185185

186-
If you want something that's not Rust code, you can add an annotation:
187-
188-
```rust
189-
/// ```c
190-
/// printf("Hello, world\n");
191-
/// ```
192-
# fn foo() {}
193-
```
194-
195-
This will highlight according to whatever language you're showing off.
196-
If you're only showing plain text, choose `text`.
197-
198-
It's important to choose the correct annotation here, because `rustdoc` uses it
199-
in an interesting way: It can be used to actually test your examples in a
200-
library crate, so that they don't get out of date. If you have some C code but
201-
`rustdoc` thinks it's Rust because you left off the annotation, `rustdoc` will
202-
complain when trying to generate the documentation.
203-
204186
## Documentation as tests
205187

206188
Let's discuss our sample example documentation:

0 commit comments

Comments
 (0)