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)
}
}