@@ -23,9 +23,7 @@ LL | Some(3)?;
23
23
| ^ use `.ok_or(...)?` to provide an error compatible with `Result<u64, String>`
24
24
|
25
25
= help: the trait `FromResidual<Option<Infallible>>` is not implemented for `Result<u64, String>`
26
- = help: the following other types implement trait `FromResidual<R>`:
27
- `Result<T, F>` implements `FromResidual<Result<Infallible, E>>`
28
- `Result<T, F>` implements `FromResidual<Yeet<E>>`
26
+ = help: the trait `FromResidual<Result<Infallible, E>>` is implemented for `Result<T, F>`
29
27
30
28
error[E0277]: the `?` operator can only be used on `Result`s in a function that returns `Result`
31
29
--> $DIR/bad-interconversion.rs:17:31
@@ -36,9 +34,7 @@ LL | Ok(ControlFlow::Break(123)?)
36
34
| ^ this `?` produces `ControlFlow<{integer}, Infallible>`, which is incompatible with `Result<u64, String>`
37
35
|
38
36
= help: the trait `FromResidual<ControlFlow<{integer}, Infallible>>` is not implemented for `Result<u64, String>`
39
- = help: the following other types implement trait `FromResidual<R>`:
40
- `Result<T, F>` implements `FromResidual<Result<Infallible, E>>`
41
- `Result<T, F>` implements `FromResidual<Yeet<E>>`
37
+ = help: the trait `FromResidual<Result<Infallible, E>>` is implemented for `Result<T, F>`
42
38
43
39
error[E0277]: the `?` operator can only be used on `Option`s, not `Result`s, in a function that returns `Option`
44
40
--> $DIR/bad-interconversion.rs:22:22
@@ -49,9 +45,7 @@ LL | Some(Err("hello")?)
49
45
| ^ use `.ok()?` if you want to discard the `Result<Infallible, &str>` error information
50
46
|
51
47
= help: the trait `FromResidual<Result<Infallible, &str>>` is not implemented for `Option<u16>`
52
- = help: the following other types implement trait `FromResidual<R>`:
53
- `Option<T>` implements `FromResidual<Yeet<()>>`
54
- `Option<T>` implements `FromResidual`
48
+ = help: the trait `FromResidual` is implemented for `Option<T>`
55
49
56
50
error[E0277]: the `?` operator can only be used on `Option`s in a function that returns `Option`
57
51
--> $DIR/bad-interconversion.rs:27:33
@@ -62,9 +56,7 @@ LL | Some(ControlFlow::Break(123)?)
62
56
| ^ this `?` produces `ControlFlow<{integer}, Infallible>`, which is incompatible with `Option<u64>`
63
57
|
64
58
= help: the trait `FromResidual<ControlFlow<{integer}, Infallible>>` is not implemented for `Option<u64>`
65
- = help: the following other types implement trait `FromResidual<R>`:
66
- `Option<T>` implements `FromResidual<Yeet<()>>`
67
- `Option<T>` implements `FromResidual`
59
+ = help: the trait `FromResidual` is implemented for `Option<T>`
68
60
69
61
error[E0277]: the `?` operator can only be used on `ControlFlow`s in a function that returns `ControlFlow`
70
62
--> $DIR/bad-interconversion.rs:32:39
0 commit comments