Rollup merge of #71409 - estebank:point-at-ret-question-mark-op, r=petrochenkov

Point at the return type on `.into()` failure caused by `?`

Fix #35946.
This commit is contained in:
Dylan DPC 2020-04-27 03:26:13 +02:00 committed by GitHub
commit c95bcbc9d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 14 deletions

View file

@ -1,6 +1,8 @@
error[E0277]: `?` couldn't convert the error to `()`
--> $DIR/issue-32709.rs:4:11
|
LL | fn a() -> Result<i32, ()> {
| --------------- expected `()` because of this
LL | Err(5)?;
| ^ the trait `std::convert::From<{integer}>` is not implemented for `()`
|