File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 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 `()`
44LL | Err(5)?;
55 | ^ the trait `std::convert::From<{integer}>` is not implemented for `()`
66 |
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`
89
910error: aborting due to previous error
1011
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ LL | Err("")?;
1010 <i32 as std::convert::From<i8>>
1111 <i32 as std::convert::From<std::num::NonZeroI32>>
1212 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`
1415
1516error[E0271]: type mismatch resolving `<std::result::Result<i32, i32> as std::ops::Try>::Ok == &str`
1617 --> $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 `()`
44LL | x?;
55 | ^ the trait `std::convert::From<std::option::NoneError>` is not implemented for `()`
66 |
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`
89
910error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
1011 --> $DIR/try-on-option.rs:13:5
You can’t perform that action at this time.
0 commit comments