summaryrefslogtreecommitdiffstats
path: root/src/test/ui/inference/cannot-infer-async.rs
blob: e7fabd0ffbc8bd178b4457d0c82598b9c5fbccf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// edition:2018

use std::io::Error;

fn make_unit() -> Result<(), Error> {
    Ok(())
}

fn main() {
    let fut = async {
        make_unit()?;

        Ok(()) //~ ERROR type annotations needed
    };
}