File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff 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
206188Let's discuss our sample example documentation:
You can’t perform that action at this time.
0 commit comments