blob: 5e1147403143e55bd436d9b707a6031adcd3e200 [file] [log] [blame]
// edition:2018
use core::future::Future;
async fn base_thing() -> Result<(), ()> {
Ok(())
}
fn thing_one() -> impl Future<Output = Result<(), ()>> {
base_thing()
}
fn thing_two() -> impl Future<Output = Result<(), ()>> {
base_thing()
}
async fn thing() -> Result<(), ()> {
if true {
thing_one()
} else {
thing_two() //~ ERROR `if` and `else` have incompatible types
}.await
}
fn main() {}