File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -546,6 +546,31 @@ 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 thing in your project is
552
+ 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
+
549
574
### Controlling HTML
550
575
551
576
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