- if substs.as_closure().is_valid() {
- // Search for the first inference variable
- let mut uninferred_ty =
- substs.as_closure().upvar_tys().filter(|ty| ty.is_ty_infer());
- if uninferred_ty.next().is_some() {
- // If the upvar substs contain an inference variable we haven't
- // finished capture analysis.
- p!(write(" closure_substs=(unavailable)"));
- } else {
- p!(write(" closure_kind_ty="), print(substs.as_closure().kind_ty()));
- p!(
- write(" closure_sig_as_fn_ptr_ty="),
- print(substs.as_closure().sig_as_fn_ptr_ty())
- );
- p!(write(" upvar_tys=("));
- self = self.comma_sep(substs.as_closure().upvar_tys())?;
- p!(write(")"));
- }
+ if !substs.as_closure().is_valid() {
+ p!(" closure_substs=(unavailable)");
+ } else {
+ p!(" closure_kind_ty=", print(substs.as_closure().kind_ty()));
+ p!(
+ " closure_sig_as_fn_ptr_ty=",
+ print(substs.as_closure().sig_as_fn_ptr_ty())
+ );
+ p!(" upvar_tys=(");
+ self = self.comma_sep(substs.as_closure().upvar_tys())?;
+ p!(")");