You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tests/ui/async-await/async-closures/is-not-fn.current.stderr
+4-4
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
-
error[E0271]: expected `{async closure@is-not-fn.rs:5:14}` to be a closure that returns `()`, but it returns `{async closure body@$DIR/is-not-fn.rs:5:23: 5:25}`
2
-
--> $DIR/is-not-fn.rs:5:14
1
+
error[E0271]: expected `{async closure@is-not-fn.rs:8:14}` to be a closure that returns `()`, but it returns `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25}`
2
+
--> $DIR/is-not-fn.rs:8:14
3
3
|
4
4
LL | needs_fn(async || {});
5
5
| -------- ^^^^^^^^^^^ expected `()`, found `async` closure body
6
6
| |
7
7
| required by a bound introduced by this call
8
8
|
9
9
= note: expected unit type `()`
10
-
found `async` closure body `{async closure body@$DIR/is-not-fn.rs:5:23: 5:25}`
10
+
found `async` closure body `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25}`
error[E0271]: expected `{async closure@is-not-fn.rs:8:14}` to be a closure that returns `()`, but it returns `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25}`
2
+
--> $DIR/is-not-fn.rs:8:14
3
+
|
4
+
LL | needs_fn(async || {});
5
+
| -------- ^^^^^^^^^^^ expected `()`, found `async` closure body
6
+
| |
7
+
| required by a bound introduced by this call
8
+
|
9
+
= note: expected unit type `()`
10
+
found `async` closure body `{async closure body@$DIR/is-not-fn.rs:8:23: 8:25}`
11
+
note: required by a bound in `needs_fn`
12
+
--> $DIR/is-not-fn.rs:7:25
13
+
|
14
+
LL | fn needs_fn(x: impl FnOnce()) {}
15
+
| ^^^^^^^^ required by this bound in `needs_fn`
16
+
17
+
error: aborting due to 1 previous error
18
+
19
+
For more information about this error, try `rustc --explain E0271`.
0 commit comments