Skip to content

Commit 6dc8242

Browse files
committed
Add doc comment to hiding portions of code example
Refactor hiding example to be more complete
1 parent df40e61 commit 6dc8242

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/doc/rustdoc/src/documentation-tests.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ from your example, but are important to make the tests work. Consider
7979
an example block that looks like this:
8080

8181
```text
82-
/// Some documentation.
83-
# fn foo() {}
82+
/// /// Some documentation.
83+
/// # fn foo() {} // this function will be hidden
84+
/// println!("Hello, World!");
8485
```
8586

8687
It will render like this:

0 commit comments

Comments
 (0)