about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/doc/trpl/comments.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/doc/trpl/comments.md b/src/doc/trpl/comments.md
index fa27d1c226c..7687d2a57da 100644
--- a/src/doc/trpl/comments.md
+++ b/src/doc/trpl/comments.md
@@ -29,6 +29,9 @@ The other kind of comment is a doc comment. Doc comments use `///` instead of
 /// let five = 5;
 ///
 /// assert_eq!(6, add_one(5));
+/// # fn add_one(x: i32) -> i32 {
+/// #     x + 1
+/// # }
 /// ```
 fn add_one(x: i32) -> i32 {
     x + 1