capture_disjoint_fields(rust-lang#53488)

Refactoring out the HirId of the UpvarId in another struct.
This commit is contained in:
Blitzerr 2018-11-14 21:14:46 -08:00
parent 1ca505a30a
commit 6779bb485c
15 changed files with 41 additions and 30 deletions

View file

@ -678,8 +678,8 @@ impl<'tcx> fmt::Debug for ty::ClosureUpvar<'tcx> {
impl fmt::Debug for ty::UpvarId {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "UpvarId({:?};`{}`;{:?})",
self.var_id,
ty::tls::with(|tcx| tcx.hir.name(tcx.hir.hir_to_node_id(self.var_id))),
self.var_path.hir_id,
ty::tls::with(|tcx| tcx.hir.name(tcx.hir.hir_to_node_id(self.var_path.hir_id))),
self.closure_expr_id)
}
}