1
Fork 0

Address comments

This commit is contained in:
Roxane 2020-10-14 00:17:42 -04:00
parent 3c46fd67f8
commit a64ad51ff7
3 changed files with 27 additions and 42 deletions

View file

@ -214,6 +214,11 @@ fn dtorck_constraint_for_ty<'tcx>(
if !substs.as_closure().is_valid() {
// By the time this code runs, all type variables ought to
// be fully resolved.
tcx.sess.delay_span_bug(
span,
&format!("upvar_tys for closure not found. Expected capture information for closure {}", ty,),
);
return Err(NoSolution);
}
@ -252,6 +257,10 @@ fn dtorck_constraint_for_ty<'tcx>(
if !substs.as_generator().is_valid() {
// By the time this code runs, all type variables ought to
// be fully resolved.
tcx.sess.delay_span_bug(
span,
&format!("upvar_tys for generator not found. Expected capture information for generator {}", ty,),
);
return Err(NoSolution);
}