We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9748574 + 03afbf9 commit 7b78538Copy full SHA for 7b78538
src/doc/trpl/comments.md
@@ -38,6 +38,17 @@ fn add_one(x: i32) -> i32 {
38
}
39
```
40
41
+There is another style of doc comment, `//!`, to comment containing items (e.g.
42
+crates, modules or functions), instead of the items following it. Commonly used
43
+inside crates root (lib.rs) or modules root (mod.rs):
44
+
45
+```
46
+//! # The Rust Standard Library
47
+//!
48
+//! The Rust Standard Library provides the essential runtime
49
+//! functionality for building portable Rust software.
50
51
52
When writing doc comments, providing some examples of usage is very, very
53
helpful. You’ll notice we’ve used a new macro here: `assert_eq!`. This compares
54
two values, and `panic!`s if they’re not equal to each other. It’s very helpful
0 commit comments