Fix issue 78654.
This commit is contained in:
parent
601c13c6fd
commit
a70e0c20c3
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