summaryrefslogtreecommitdiffstats
path: root/tests/ui/try-trait/bad-interconversion.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/try-trait/bad-interconversion.stderr')
-rw-r--r--tests/ui/try-trait/bad-interconversion.stderr9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/ui/try-trait/bad-interconversion.stderr b/tests/ui/try-trait/bad-interconversion.stderr
index 7eb392faa..d8b9431be 100644
--- a/tests/ui/try-trait/bad-interconversion.stderr
+++ b/tests/ui/try-trait/bad-interconversion.stderr
@@ -73,7 +73,8 @@ LL | ControlFlow::Continue(Err("hello")?)
| ^ this `?` produces `Result<Infallible, &str>`, which is incompatible with `ControlFlow<String>`
|
= help: the trait `FromResidual<Result<Infallible, &str>>` is not implemented for `ControlFlow<String>`
- = help: the trait `FromResidual` is implemented for `ControlFlow<B, C>`
+ = help: the trait `FromResidual<ControlFlow<String, Infallible>>` is implemented for `ControlFlow<String>`
+ = help: for that trait implementation, expected `ControlFlow<String, Infallible>`, found `Result<Infallible, &str>`
error[E0277]: the `?` operator can only be used on `ControlFlow`s in a function that returns `ControlFlow`
--> $DIR/bad-interconversion.rs:37:12
@@ -84,7 +85,8 @@ LL | Some(3)?;
| ^ this `?` produces `Option<Infallible>`, which is incompatible with `ControlFlow<u64>`
|
= help: the trait `FromResidual<Option<Infallible>>` is not implemented for `ControlFlow<u64>`
- = help: the trait `FromResidual` is implemented for `ControlFlow<B, C>`
+ = help: the trait `FromResidual<ControlFlow<u64, Infallible>>` is implemented for `ControlFlow<u64>`
+ = help: for that trait implementation, expected `ControlFlow<u64, Infallible>`, found `Option<Infallible>`
error[E0277]: the `?` operator in a function that returns `ControlFlow<B, _>` can only be used on other `ControlFlow<B, _>`s (with the same Break type)
--> $DIR/bad-interconversion.rs:43:29
@@ -96,7 +98,8 @@ LL | ControlFlow::Break(4_u8)?;
|
= help: the trait `FromResidual<ControlFlow<u8, Infallible>>` is not implemented for `ControlFlow<i64>`
= note: unlike `Result`, there's no `From`-conversion performed for `ControlFlow`
- = help: the trait `FromResidual` is implemented for `ControlFlow<B, C>`
+ = help: the trait `FromResidual<ControlFlow<i64, Infallible>>` is implemented for `ControlFlow<i64>`
+ = help: for that trait implementation, expected `i64`, found `u8`
error: aborting due to 8 previous errors