1
Fork 0

Fix issue 78654.

This commit is contained in:
Hameer Abbasi 2020-11-04 15:32:18 +00:00
parent 601c13c6fd
commit a70e0c20c3
4 changed files with 55 additions and 0 deletions

View file

@ -605,6 +605,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let ret_ty = self.inh.infcx.shallow_resolve(ret_ty);
let ret_vid = match *ret_ty.kind() {
ty::Infer(ty::TyVar(ret_vid)) => ret_vid,
ty::Error(_) => return None,
_ => span_bug!(
self.tcx.def_span(expr_def_id),
"async fn generator return type not an inference variable"