Teach typeck/borrowck/solvers how to deal with async closures
This commit is contained in:
@@ -58,6 +58,7 @@ impl<'tcx> MirPass<'tcx> for Validator {
|
||||
let body_abi = match body_ty.kind() {
|
||||
ty::FnDef(..) => body_ty.fn_sig(tcx).abi(),
|
||||
ty::Closure(..) => Abi::RustCall,
|
||||
ty::CoroutineClosure(..) => Abi::RustCall,
|
||||
ty::Coroutine(..) => Abi::Rust,
|
||||
_ => {
|
||||
span_bug!(body.span, "unexpected body ty: {:?} phase {:?}", body_ty, mir_phase)
|
||||
|
||||
Reference in New Issue
Block a user