diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-02-02 01:00:12 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-02-02 01:00:33 +0000 |
| commit | 9ebbba4ad92ad800d5029fdae34f53aa1e57df5a (patch) | |
| tree | 99b1b8e231d252e7579dd843944472e3b33c6f72 /tests/ui/async-await/async-closures/is-not-fn.rs | |
| parent | 7f36543a48e52912ac6664a70c0a5b9d86509eaf (diff) | |
| download | rust-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.rs | 2 |
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 `()` } |
