Rollup merge of #78739 - hameerabbasi:issue-78654, r=nikomatsakis
Fix ICE on type error in async function Fixes #78654
This commit is contained in:
commit
171d29c9c5
4 changed files with 55 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue