Skip to content

Commit 1547743

Browse files
authored
Update try-block-bad-type.stderr to match impls
1 parent d18f4b3 commit 1547743

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/ui/try-block/try-block-bad-type.stderr

+3-4
Original file line numberDiff line numberDiff 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

1514
error[E0271]: type mismatch resolving `<Result<i32, i32> as Try>::Output == &str`
1615
--> $DIR/try-block-bad-type.rs:12:9

0 commit comments

Comments
 (0)