File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ error[E0277]: `?` couldn't convert the error to `()`
4
4
LL | Err(5)?;
5
5
| ^ the trait `std::convert::From<{integer}>` is not implemented for `()`
6
6
|
7
- = note: required by `std::convert::From::from`
7
+ = note: required because of the requirements on the impl of `std::convert::Into<()>` for `{integer}`
8
+ = note: required by `std::convert::Into::into`
8
9
9
10
error: aborting due to previous error
10
11
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ LL | Err("")?;
10
10
<i32 as std::convert::From<i8>>
11
11
<i32 as std::convert::From<std::num::NonZeroI32>>
12
12
and 2 others
13
- = note: required by `std::convert::From::from`
13
+ = note: required because of the requirements on the impl of `std::convert::Into<i32>` for `&str`
14
+ = note: required by `std::convert::Into::into`
14
15
15
16
error[E0271]: type mismatch resolving `<std::result::Result<i32, i32> as std::ops::Try>::Ok == &str`
16
17
--> $DIR/try-block-bad-type.rs:12:9
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ error[E0277]: `?` couldn't convert the error to `()`
4
4
LL | x?;
5
5
| ^ the trait `std::convert::From<std::option::NoneError>` is not implemented for `()`
6
6
|
7
- = note: required by `std::convert::From::from`
7
+ = note: required because of the requirements on the impl of `std::convert::Into<()>` for `std::option::NoneError`
8
+ = note: required by `std::convert::Into::into`
8
9
9
10
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
10
11
--> $DIR/try-on-option.rs:13:5
You can’t perform that action at this time.
0 commit comments