]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/try-block/try-block-bad-type.stderr
try-back-block-type test: Use TryFromSliceError for From test
[rust.git] / src / test / ui / try-block / try-block-bad-type.stderr
index 2d1313d7d0e31a0f88f1de061fa7c6abbd3007d4..75a42c0d6b71b9f08103de11072e2aa50054ceb7 100644 (file)
@@ -1,16 +1,12 @@
-error[E0277]: `?` couldn't convert the error to `i32`
+error[E0277]: `?` couldn't convert the error to `TryFromSliceError`
   --> $DIR/try-block-bad-type.rs:7:16
    |
 LL |         Err("")?;
-   |                ^ the trait `From<&str>` is not implemented for `i32`
+   |                ^ the trait `From<&str>` is not implemented for `TryFromSliceError`
    |
    = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
    = help: the following implementations were found:
-             <i32 as From<NonZeroI32>>
-             <i32 as From<bool>>
-             <i32 as From<i16>>
-             <i32 as From<i8>>
-           and 2 others
+             <TryFromSliceError as From<Infallible>>
    = note: required by `from`
 
 error[E0271]: type mismatch resolving `<Result<i32, i32> as Try>::Ok == &str`