about summary refs log tree commit diff
path: root/tests/ui/async-await/async-closures/is-not-fn.rs
blob: c09ccb3fc2b09a5381a542976e0e9be4b90e414d (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ edition:2021
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver

fn main() {
    fn needs_fn(x: impl FnOnce()) {}
    needs_fn(async || {});
    //[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} == ()`
}