From 65962708f801afefd0d04a77ad171788df0918e6 Mon Sep 17 00:00:00 2001 From: Cameron Ditchfield <26909787+csditchfield@users.noreply.github.com> Date: Sat, 21 Oct 2023 19:40:08 -0500 Subject: [PATCH] fix what-to-include doc example Fixes the second example in the Examples section of what-to-include.md by marking main as a function. --- src/doc/rustdoc/src/write-documentation/what-to-include.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/rustdoc/src/write-documentation/what-to-include.md b/src/doc/rustdoc/src/write-documentation/what-to-include.md index 4bcae4d222c..75d3b7dae61 100644 --- a/src/doc/rustdoc/src/write-documentation/what-to-include.md +++ b/src/doc/rustdoc/src/write-documentation/what-to-include.md @@ -73,7 +73,7 @@ and your test suite, this example needs some additional code: ``````text /// Example /// ```rust -/// # main() -> Result<(), std::num::ParseIntError> { +/// # fn main() -> Result<(), std::num::ParseIntError> { /// let fortytwo = "42".parse::()?; /// println!("{} + 10 = {}", fortytwo, fortytwo+10); /// # Ok(())