File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -184,11 +184,17 @@ macro scope.
184
184
object file that this item's contents will be placed into.
185
185
- ` no_mangle ` - on any item, do not apply the standard name mangling. Set the
186
186
symbol for this item to its identifier.
187
- - ` doc ` - Doc comments such as ` /// foo ` are equivalent to ` #[doc = "foo"] ` .
188
187
- ` must_use ` - on structs and enums, will warn if a value of this type isn't used or
189
188
assigned to a variable. You may also include an optional message by using
190
189
` #[must_use = "message"] ` which will be given alongside the warning.
191
190
191
+ ### Documentation
192
+
193
+ The ` doc ` attribute is used to document items and fields. [ Doc comments]
194
+ are transformed into ` doc ` attributes.
195
+
196
+ See [ The Rustdoc Book] for reference material on this attribute.
197
+
192
198
### Conditional compilation
193
199
194
200
Sometimes one wants to have different compiler outputs from the same code,
@@ -408,4 +414,6 @@ impl<T: PartialEq> PartialEq for Foo<T> {
408
414
409
415
You can implement ` derive ` for your own type through [ procedural macros] .
410
416
411
- [ procedural macros ] : procedural-macros.html
417
+ [ Doc comments ] : comments.html#doc-comments
418
+ [ The Rustdoc Book ] : ../rustdoc/the-doc-attribute.html
419
+ [ procedural macros ] : procedural-macros.html
You can’t perform that action at this time.
0 commit comments