Skip to content

Commit 70f4354

Browse files
authored
Merge pull request #1203 from Rosto75/master
Add Cargo comment to the `try!` macro example.
2 parents db0b207 + 6216eda commit 70f4354

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/error/multiple_error_types/reenter_question_mark.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Here, we rewrite the previous example using `?`. As a result, the
2525
```rust,editable
2626
use std::error;
2727
use std::fmt;
28-
use std::num::ParseIntError;
2928
3029
// Change the alias to `Box<error::Error>`.
3130
type Result<T> = std::result::Result<T, Box<error::Error>>;

src/error/result/enter_question_mark.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ at older code. The same `multiply` function from the previous example
4444
would look like this using `try!`:
4545

4646
```rust,editable
47+
// To compile and run this example without errors, while using Cargo, change the value
48+
// of the `edition` field, in the `[package]` section of the `Cargo.toml` file, to "2015".
49+
4750
use std::num::ParseIntError;
4851
4952
fn multiply(first_number_str: &str, second_number_str: &str) -> Result<i32, ParseIntError> {

0 commit comments

Comments
 (0)