We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ca5003 commit ce1e6a4Copy full SHA for ce1e6a4
src/doc/rustdoc/src/write-documentation/the-doc-attribute.md
@@ -9,11 +9,11 @@ are the same:
9
10
```rust,no_run
11
/// This is a doc comment.
12
-#[doc = " This is a doc comment."]
+#[doc = r" This is a doc comment."]
13
# fn f() {}
14
```
15
16
-(Note the leading space in the attribute version.)
+(Note the leading space and the raw string literal in the attribute version.)
17
18
In most cases, `///` is easier to use than `#[doc]`. One case where the latter is easier is
19
when generating documentation in macros; the `collapse-docs` pass will combine multiple
0 commit comments