print more information for closures when -Zverbose is given

Ideally, we'd probably print the closure substs themselves actually.
This commit is contained in:
Niko Matsakis 2019-02-01 10:33:44 -05:00 committed by Felix S. Klock II
parent f47ec2ad5b
commit 378741b703

View File

@ -1430,6 +1430,15 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
}
}
if cx.is_verbose {
write!(
f,
" closure_kind_ty={:?} closure_sig_ty={:?}",
substs.closure_kind_ty(did, tcx),
substs.closure_sig_ty(did, tcx),
)?;
}
write!(f, "]")
}),
Array(ty, sz) => {