about summary refs log tree commit diff
path: root/tests/ui/async-await/async-closures/is-not-fn.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-02-02 01:00:12 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-02-02 01:00:33 +0000
commit9ebbba4ad92ad800d5029fdae34f53aa1e57df5a (patch)
tree99b1b8e231d252e7579dd843944472e3b33c6f72 /tests/ui/async-await/async-closures/is-not-fn.rs
parent7f36543a48e52912ac6664a70c0a5b9d86509eaf (diff)
downloadrust-9ebbba4ad92ad800d5029fdae34f53aa1e57df5a.tar.gz
rust-9ebbba4ad92ad800d5029fdae34f53aa1e57df5a.zip
Shorten error message for callable with wrong return type
```
error: expected `{closure@...}` to return `Ret`, but it returns `Other`
```
instead of
```
error: expected `{closure@...}` to be a closure that returns `Ret`, but it returns `Other`
```
Diffstat (limited to 'tests/ui/async-await/async-closures/is-not-fn.rs')
-rw-r--r--tests/ui/async-await/async-closures/is-not-fn.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/async-await/async-closures/is-not-fn.rs b/tests/ui/async-await/async-closures/is-not-fn.rs
index eacd07b7cdd..e5ab4742dab 100644
--- a/tests/ui/async-await/async-closures/is-not-fn.rs
+++ b/tests/ui/async-await/async-closures/is-not-fn.rs
@@ -6,5 +6,5 @@
 fn main() {
     fn needs_fn(x: impl FnOnce()) {}
     needs_fn(async || {});
-    //~^ ERROR expected `{async closure@is-not-fn.rs:8:14}` to be a closure that returns `()`
+    //~^ ERROR expected `{async closure@is-not-fn.rs:8:14}` to return `()`
 }