Explain that ? converts the error type using From

This commit is contained in:
Esteban Küber 2019-05-17 12:18:56 -07:00
parent 1962adea6a
commit 65b731908a
4 changed files with 9 additions and 3 deletions

View file

@ -4,6 +4,7 @@ error[E0277]: `?` couldn't convert the error to `()`
LL | Err(5)?;
| ^ the trait `std::convert::From<{integer}>` is not implemented for `()`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= note: required by `std::convert::From::from`
error: aborting due to previous error