about summary refs log tree commit diff
path: root/tests/ui/async-await/async-closures
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/async-closures')
-rw-r--r--tests/ui/async-await/async-closures/is-not-fn.next.stderr6
-rw-r--r--tests/ui/async-await/async-closures/is-not-fn.rs3
2 files changed, 4 insertions, 5 deletions
diff --git a/tests/ui/async-await/async-closures/is-not-fn.next.stderr b/tests/ui/async-await/async-closures/is-not-fn.next.stderr
index 0fab1c15f27..970970a9151 100644
--- a/tests/ui/async-await/async-closures/is-not-fn.next.stderr
+++ b/tests/ui/async-await/async-closures/is-not-fn.next.stderr
@@ -1,13 +1,11 @@
-error[E0271]: expected `{async closure@is-not-fn.rs:8:14}` to return `()`, but it returns `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25}`
+error[E0271]: type mismatch resolving `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25} == ()`
   --> $DIR/is-not-fn.rs:8:14
    |
 LL |     needs_fn(async || {});
-   |     -------- ^^^^^^^^^^^ expected `()`, found `async` closure body
+   |     -------- ^^^^^^^^^^^ types differ
    |     |
    |     required by a bound introduced by this call
    |
-   = note:         expected unit type `()`
-           found `async` closure body `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25}`
 note: required by a bound in `needs_fn`
   --> $DIR/is-not-fn.rs:7:25
    |
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 e5ab4742dab..c09ccb3fc2b 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,6 @@
 fn main() {
     fn needs_fn(x: impl FnOnce()) {}
     needs_fn(async || {});
-    //~^ ERROR expected `{async closure@is-not-fn.rs:8:14}` to return `()`
+    //[current]~^ ERROR expected `{async closure@is-not-fn.rs:8:14}` to return `()`
+    //[next]~^^ ERROR type mismatch resolving `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25} == ()`
 }