]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/borrow_check/error_reporting.rs
rustc: replace Res in hir::Upvar with only Local/Upvar data.
[rust.git] / src / librustc_mir / borrow_check / error_reporting.rs
index 5a22c81a5d0578f1d83b52458e1c9b279f73b2f0..74601cc389184814d41d6d2658d2a532a064d1ac 100644 (file)
@@ -350,7 +350,7 @@ fn describe_field_from_ty(
                     // be borrowck'ing it, so we can just unwrap:
                     let upvar = self.infcx.tcx.upvars(def_id).unwrap()[field.index()];
 
-                    self.infcx.tcx.hir().name_by_hir_id(upvar.var_id()).to_string()
+                    self.infcx.tcx.hir().name_by_hir_id(upvar.var_id).to_string()
                 }
                 _ => {
                     // Might need a revision when the fields in trait RFC is implemented