// Regression test for #87461. // edition:2021 async fn func() -> Result { let _ = async { Err(42u64) }.await?; Ok(()) //~^ ERROR: mismatched types [E0308] } async fn func2() -> Result { Err(42u64)?; Ok(()) //~^ ERROR: mismatched types [E0308] } fn main() { || -> Result { if true { return Err(42u64); } Ok(()) //~^ ERROR: mismatched types [E0308] }; }