3 ms·
No it doesn't. Rustdoc examines the "doc" attribute on every item for Markdowk code blocks and checks those. The "doc" attribute can be attached to an item dire
by tomjakubowski 12y ago
No it doesn't. Rustdoc examines the "doc" attribute on every item for Markdowk code blocks and checks those. The "doc" attribute can be attached to an item directly, using Rust's general attribute syntax, or using so-called "doc comments" which are visually and lexically distinct from ordinary comments. In the case of single line comments (the preferred style), doc comments have three slashes instead of two; a good IDE or editor mode for Rust will highlight doc comments differently than ordinary ones.
- Ygg2 12y agoRight, but it's nearly identical to having instructions in comments, like Go does. And while the post I was implying seems to think this isn't a valid use case, I think it is.