]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-32709.stderr
Rollup merge of #101420 - kraktus:doc_hir_local, r=cjgillot
[rust.git] / src / test / ui / issues / issue-32709.stderr
1 error[E0277]: `?` couldn't convert the error to `()`
2   --> $DIR/issue-32709.rs:4:11
3    |
4 LL | fn a() -> Result<i32, ()> {
5    |           --------------- expected `()` because of this
6 LL |     Err(5)?;
7    |           ^ the trait `From<{integer}>` is not implemented for `()`
8    |
9    = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
10    = help: the following other types implement trait `FromResidual<R>`:
11              <Result<T, F> as FromResidual<Result<Infallible, E>>>
12              <Result<T, F> as FromResidual<Yeet<E>>>
13    = note: required for `Result<i32, ()>` to implement `FromResidual<Result<Infallible, {integer}>>`
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0277`.