Files
rust/tests/ui/async-await/async-closures/async-fn-mut-impl-fn-once.rs

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

16 lines
297 B
Rust
Raw Permalink Normal View History

//@ edition:2021
//@ check-pass
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
fn call_once<F>(_: impl FnOnce() -> F) {}
fn main() {
let mut i = 0;
let c = async || {
i += 1;
};
call_once(c);
}