summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/issues/issue-74282.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /tests/ui/impl-trait/issues/issue-74282.stderr
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/impl-trait/issues/issue-74282.stderr')
-rw-r--r--tests/ui/impl-trait/issues/issue-74282.stderr18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/ui/impl-trait/issues/issue-74282.stderr b/tests/ui/impl-trait/issues/issue-74282.stderr
index 724f3c5d6..d43e9fee0 100644
--- a/tests/ui/impl-trait/issues/issue-74282.stderr
+++ b/tests/ui/impl-trait/issues/issue-74282.stderr
@@ -8,6 +8,7 @@ LL | Anonymous(|| {
| _____---------_^
| | |
| | arguments to this struct are incorrect
+LL | |
LL | | 3
LL | | })
| |_____^ expected opaque type, found closure
@@ -25,15 +26,20 @@ LL | struct Anonymous(Closure);
error[E0308]: mismatched types
--> $DIR/issue-74282.rs:8:5
|
-LL | fn main() {
- | - expected `()` because of default return type
-LL | let y = || -> Closure { || 3 };
LL | / Anonymous(|| {
+LL | |
LL | | 3
LL | | })
- | | ^- help: consider using a semicolon here: `;`
- | |______|
- | expected `()`, found `Anonymous`
+ | |______^ expected `()`, found `Anonymous`
+ |
+help: consider using a semicolon here
+ |
+LL | });
+ | +
+help: try adding a return type
+ |
+LL | fn bop(_: Closure) -> Anonymous {
+ | ++++++++++++
error: aborting due to 2 previous errors