diff options
Diffstat (limited to 'tests/ui/try-trait')
-rw-r--r-- | tests/ui/try-trait/bad-interconversion.stderr | 6 | ||||
-rw-r--r-- | tests/ui/try-trait/option-to-result.stderr | 2 | ||||
-rw-r--r-- | tests/ui/try-trait/try-on-option.stderr | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/ui/try-trait/bad-interconversion.stderr b/tests/ui/try-trait/bad-interconversion.stderr index a49630adb..7eb392faa 100644 --- a/tests/ui/try-trait/bad-interconversion.stderr +++ b/tests/ui/try-trait/bad-interconversion.stderr @@ -8,8 +8,8 @@ LL | Ok(Err(123_i32)?) | = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait = help: the following other types implement trait `From<T>`: - <u8 as From<NonZeroU8>> <u8 as From<bool>> + <u8 as From<NonZeroU8>> = note: required for `Result<u64, u8>` to implement `FromResidual<Result<Infallible, i32>>` error[E0277]: the `?` operator can only be used on `Result`s, not `Option`s, in a function that returns `Result` @@ -22,8 +22,8 @@ LL | Some(3)?; | = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `Result<u64, String>` = help: the following other types implement trait `FromResidual<R>`: - <Result<T, F> as FromResidual<Result<Infallible, E>>> <Result<T, F> as FromResidual<Yeet<E>>> + <Result<T, F> as FromResidual<Result<Infallible, E>>> error[E0277]: the `?` operator can only be used on `Result`s in a function that returns `Result` --> $DIR/bad-interconversion.rs:17:31 @@ -35,8 +35,8 @@ LL | Ok(ControlFlow::Break(123)?) | = help: the trait `FromResidual<ControlFlow<{integer}, Infallible>>` is not implemented for `Result<u64, String>` = help: the following other types implement trait `FromResidual<R>`: - <Result<T, F> as FromResidual<Result<Infallible, E>>> <Result<T, F> as FromResidual<Yeet<E>>> + <Result<T, F> as FromResidual<Result<Infallible, E>>> error[E0277]: the `?` operator can only be used on `Option`s, not `Result`s, in a function that returns `Option` --> $DIR/bad-interconversion.rs:22:22 diff --git a/tests/ui/try-trait/option-to-result.stderr b/tests/ui/try-trait/option-to-result.stderr index fabc1ff2c..1c4d718f1 100644 --- a/tests/ui/try-trait/option-to-result.stderr +++ b/tests/ui/try-trait/option-to-result.stderr @@ -9,8 +9,8 @@ LL | a?; | = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `Result<(), ()>` = help: the following other types implement trait `FromResidual<R>`: - <Result<T, F> as FromResidual<Result<Infallible, E>>> <Result<T, F> as FromResidual<Yeet<E>>> + <Result<T, F> as FromResidual<Result<Infallible, E>>> error[E0277]: the `?` operator can only be used on `Option`s, not `Result`s, in a function that returns `Option` --> $DIR/option-to-result.rs:11:6 diff --git a/tests/ui/try-trait/try-on-option.stderr b/tests/ui/try-trait/try-on-option.stderr index fad6a1fe8..eeb0439df 100644 --- a/tests/ui/try-trait/try-on-option.stderr +++ b/tests/ui/try-trait/try-on-option.stderr @@ -9,8 +9,8 @@ LL | x?; | = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `Result<u32, ()>` = help: the following other types implement trait `FromResidual<R>`: - <Result<T, F> as FromResidual<Result<Infallible, E>>> <Result<T, F> as FromResidual<Yeet<E>>> + <Result<T, F> as FromResidual<Result<Infallible, E>>> error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) --> $DIR/try-on-option.rs:11:6 |