mirror of
https://github.com/rust-lang/book.git
synced 2026-05-19 22:10:20 -04:00
Convert Listing 9-12 to <Listing>
(had to fix a conflect here)
This commit is contained in:
@@ -492,12 +492,13 @@ code will now compile.
|
||||
|
||||
<span class="filename">Filename: src/main.rs</span>
|
||||
|
||||
<Listing number="9-12" caption="Changing `main` to return `Result<(), E>` allows the use of the `?` operator on `Result` values.">
|
||||
|
||||
```rust,ignore
|
||||
{{#rustdoc_include ../listings/ch09-error-handling/listing-09-12/src/main.rs}}
|
||||
```
|
||||
|
||||
<span class="caption">Listing 9-12: Changing `main` to return `Result<(), E>`
|
||||
allows the use of the `?` operator on `Result` values.</span>
|
||||
</Listing>
|
||||
|
||||
The `Box<dyn Error>` type is a *trait object*, which we’ll talk about in the
|
||||
[“Using Trait Objects that Allow for Values of Different
|
||||
|
||||
Reference in New Issue
Block a user