]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc/util/ppaux.rs
New upstream version 1.21.0+dfsg1
[rustc.git] / src / librustc / util / ppaux.rs
index d9c99ccd50843d79e6e4bcadc974f771de3d2a4a..184fd75135e471425084c505ebbe1c26c8345553 100644 (file)
@@ -864,9 +864,9 @@ impl<'tcx> fmt::Display for ty::TyS<'tcx> {
 
 impl fmt::Debug for ty::UpvarId {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "UpvarId({};`{}`;{})",
+        write!(f, "UpvarId({:?};`{}`;{:?})",
                self.var_id,
-               ty::tls::with(|tcx| tcx.local_var_name_str(self.var_id)),
+               ty::tls::with(|tcx| tcx.local_var_name_str_def_index(self.var_id)),
                self.closure_expr_id)
     }
 }