File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -546,6 +546,38 @@ extern crate foo;
546
546
pub use foo::bar;
547
547
```
548
548
549
+ ## Missing documentation
550
+
551
+ Sometimes you want to make sure that every single public thing in your project
552
+ is documented, especially when you are working on a library. Rust allows you to
553
+ to generate warnings or errors, when an item is missing documentation.
554
+ To generate warnings you use ` warn ` :
555
+
556
+ ``` rust
557
+ #![warn(missing_docs)]
558
+ ```
559
+
560
+ And to generate errors you use ` deny ` :
561
+
562
+ ``` rust,ignore
563
+ #![deny(missing_docs)]
564
+ ```
565
+
566
+ There are cases where you want to disable these warnings/errors to explicitly
567
+ leave something undocumented. This is done by using ` allow ` :
568
+
569
+ ``` rust
570
+ #[allow(missing_docs)]
571
+ struct Undocumented ;
572
+ ```
573
+
574
+ You might even want to hide items from the documentation completely:
575
+
576
+ ``` rust
577
+ #[doc(hidden)]
578
+ struct Hidden ;
579
+ ```
580
+
549
581
### Controlling HTML
550
582
551
583
You can control a few aspects of the HTML that ` rustdoc ` generates through the
You can’t perform that action at this time.
0 commit comments