Rollup merge of #117037 - csditchfield:fix_doc_writing_result_example, r=notriddle

rustdoc book doc example error

closes #117036

This is the minimal change required to make the second what-to-include.md example valid.
Another more modern solution could be considered:
```
/// Example
/// ```rust
/// let fortytwo = "42".parse::<u32>()?;
/// println!("{} + 10 = {}", fortytwo, fortytwo+10);
/// #     Ok::<(), <u32 as std::str::FromStr>::Err>(())
/// ```
```
This commit is contained in:
Matthias Krüger 2023-10-22 09:15:43 +02:00 committed by GitHub
commit 77d8a73fa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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::<u32>()?;
/// println!("{} + 10 = {}", fortytwo, fortytwo+10);
/// # Ok(())