about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authormandeep <mandeep@users.noreply.github.com>2018-05-17 21:15:32 -0500
committermandeep <mandeep@users.noreply.github.com>2018-05-18 10:06:38 -0500
commit6dc824257ad36ce44cd41340a1b0cd87b78dfaf7 (patch)
tree55c8eb95aefd9be5ae2dd2417efd49c8c7a583f6 /src/doc
parentdf40e61382a2cba0be621fdabb9971ce3475e9a7 (diff)
downloadrust-6dc824257ad36ce44cd41340a1b0cd87b78dfaf7.tar.gz
rust-6dc824257ad36ce44cd41340a1b0cd87b78dfaf7.zip
Add doc comment to hiding portions of code example
Refactor hiding example to be more complete
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/rustdoc/src/documentation-tests.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/doc/rustdoc/src/documentation-tests.md b/src/doc/rustdoc/src/documentation-tests.md
index 3098587a8a4..eb5c53f899b 100644
--- a/src/doc/rustdoc/src/documentation-tests.md
+++ b/src/doc/rustdoc/src/documentation-tests.md
@@ -79,8 +79,9 @@ from your example, but are important to make the tests work. Consider
 an example block that looks like this:
 
 ```text
-/// Some documentation.
-# fn foo() {}
+/// /// Some documentation.
+/// # fn foo() {} // this function will be hidden
+/// println!("Hello, World!");
 ```
 
 It will render like this: