rust/tests/ui/async-await/async-closures/not-fn.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
496 B
Plaintext
Raw Normal View History

2024-02-14 17:52:57 -06:00
error: async closure does not implement `FnMut` because it captures state from its environment
--> $DIR/not-fn.rs:11:14
|
LL | needs_fn(async || {
| -------- ^^^^^^^^
| |
| required by a bound introduced by this call
|
note: required by a bound in `needs_fn`
--> $DIR/not-fn.rs:8:28
|
LL | fn needs_fn<T>(_: impl FnMut() -> T) {}
| ^^^^^^^^^^^^ required by this bound in `needs_fn`
error: aborting due to 1 previous error