about summary refs log tree commit diff
path: root/tests/ui/try-trait
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-09-10 03:33:07 +0000
committerMichael Goulet <michael@errs.io>2023-10-02 23:14:29 +0000
commit07851679cd8ced5933095c4173d3877c1abc96dd (patch)
tree3ed129e5c177f5d1d9df0874ef8f20c67a7b43e2 /tests/ui/try-trait
parent8be12f4ed70c55652fefdec63d094974d00e164c (diff)
downloadrust-07851679cd8ced5933095c4173d3877c1abc96dd.tar.gz
rust-07851679cd8ced5933095c4173d3877c1abc96dd.zip
Point out the actual mismatch error
Diffstat (limited to 'tests/ui/try-trait')
-rw-r--r--tests/ui/try-trait/bad-interconversion.stderr3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ui/try-trait/bad-interconversion.stderr b/tests/ui/try-trait/bad-interconversion.stderr
index 7039a5c5495..d8b9431becc 100644
--- a/tests/ui/try-trait/bad-interconversion.stderr
+++ b/tests/ui/try-trait/bad-interconversion.stderr
@@ -74,6 +74,7 @@ LL |     ControlFlow::Continue(Err("hello")?)
    |
    = help: the trait `FromResidual<Result<Infallible, &str>>` is not implemented for `ControlFlow<String>`
    = 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
@@ -85,6 +86,7 @@ LL |     Some(3)?;
    |
    = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `ControlFlow<u64>`
    = 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
@@ -97,6 +99,7 @@ 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<ControlFlow<i64, Infallible>>` is implemented for `ControlFlow<i64>`
+   = help: for that trait implementation, expected `i64`, found `u8`
 
 error: aborting due to 8 previous errors