about summary refs log tree commit diff
diff options
context:
space:
mode:
authorpanicbit <panicbit.dev@gmail.com>2015-10-09 03:00:43 +0200
committerpanicbit <panicbit.dev@gmail.com>2015-10-09 03:00:43 +0200
commit6b5eb70e1db79f1fca9f01b6a671e822d6553ccd (patch)
tree9963184dbb82d972a65f52146e0e11cf5b964e51
parent11eda66df859f53754788044476af753a012332f (diff)
downloadrust-6b5eb70e1db79f1fca9f01b6a671e822d6553ccd.tar.gz
rust-6b5eb70e1db79f1fca9f01b6a671e822d6553ccd.zip
trpl: mention missing_docs lint
-rw-r--r--src/doc/trpl/documentation.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/doc/trpl/documentation.md b/src/doc/trpl/documentation.md
index 1e1b2e2d458..b9de4110a66 100644
--- a/src/doc/trpl/documentation.md
+++ b/src/doc/trpl/documentation.md
@@ -546,6 +546,31 @@ extern crate foo;
 pub use foo::bar;
 ```
 
+## Missing documentation
+
+Sometimes you want to make sure that every single thing in your project is
+documented, especially when you are working on a library. Rust allows you to
+to generate warnings or errors, when an item is missing documentation.
+To generate warnings you use `warn`:
+
+```rust
+#![warn(missing_docs)]
+```
+
+And to generate errors you use `deny`:
+
+```rust,ignore
+#![deny(missing_docs)]
+```
+
+There are cases where you want to disable these warnings/errors to explicitly
+leave something undocumented. This is done by using `allow`:
+
+```rust
+#[allow(missing_docs)]
+struct Undocumented;
+```
+
 ### Controlling HTML
 
 You can control a few aspects of the HTML that `rustdoc` generates through the