summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/auxiliary/issue-111011.rs
blob: 927134a588c18f7d063fa144d439c52dafbee92a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(async_closure)]

// edition:2021

fn foo<X>(x: impl FnOnce() -> Box<X>) {}
// just to make sure async closures can still be suggested for boxing.
fn bar<X>(x: Box<dyn FnOnce() -> X>) {}

fn main() {
    foo(async move || {}); //~ ERROR mismatched types
    bar(async move || {}); //~ ERROR mismatched types
}