Point at try ? on errors affecting the err match arm of the desugared code
This commit is contained in:
parent
70f130954d
commit
007b40be01
4 changed files with 21 additions and 13 deletions
|
|
@ -1,8 +1,8 @@
|
|||
error[E0277]: the trait bound `(): std::convert::From<{integer}>` is not satisfied
|
||||
--> $DIR/issue-32709.rs:4:5
|
||||
--> $DIR/issue-32709.rs:4:11
|
||||
|
|
||||
LL | Err(5)?;
|
||||
| ^^^^^^^ the trait `std::convert::From<{integer}>` is not implemented for `()`
|
||||
| ^ the trait `std::convert::From<{integer}>` is not implemented for `()`
|
||||
|
|
||||
= note: required by `std::convert::From::from`
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error[E0277]: the trait bound `i32: std::convert::From<&str>` is not satisfied
|
||||
--> $DIR/try-block-bad-type.rs:7:9
|
||||
--> $DIR/try-block-bad-type.rs:7:16
|
||||
|
|
||||
LL | Err("")?;
|
||||
| ^^^^^^^^ the trait `std::convert::From<&str>` is not implemented for `i32`
|
||||
| ^ the trait `std::convert::From<&str>` is not implemented for `i32`
|
||||
|
|
||||
= help: the following implementations were found:
|
||||
<i32 as std::convert::From<bool>>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error[E0277]: the trait bound `(): std::convert::From<std::option::NoneError>` is not satisfied
|
||||
--> $DIR/try-on-option.rs:7:5
|
||||
--> $DIR/try-on-option.rs:7:6
|
||||
|
|
||||
LL | x?;
|
||||
| ^^ the trait `std::convert::From<std::option::NoneError>` is not implemented for `()`
|
||||
| ^ the trait `std::convert::From<std::option::NoneError>` is not implemented for `()`
|
||||
|
|
||||
= note: required by `std::convert::From::from`
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue