File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,9 @@ LL | Err("")?;
77 | this can't be annotated with `?` because it has type `Result<_, &str>`
88 |
99 = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
10- = help: the trait `From<&str>` is not implemented for `TryFromSliceError`
11- but trait `From<Infallible>` is implemented for it
12- = help: for that trait implementation, expected `Infallible`, found `&str`
13- = note: required for `Result<u32, TryFromSliceError>` to implement `FromResidual<Result<Infallible, &str>>`
10+ = help: the following other types implement trait `From<T>`:
11+ `TryFromSliceError` implements `From<!>`
12+ `TryFromSliceError` implements `From<Infallible>`
1413
1514error[E0271]: type mismatch resolving `<Result<i32, i32> as Try>::Output == &str`
1615 --> $DIR/try-block-bad-type.rs:12:9
You can’t perform that action at this time.
0 commit comments