about summary refs log tree commit diff
path: root/src/librustc/infer
diff options
context:
space:
mode:
authorBlitzerr <rusty.blitzerr@gmail.com>2018-11-14 21:14:46 -0800
committerBlitzerr <rusty.blitzerr@gmail.com>2018-11-14 21:18:48 -0800
commit6779bb485c7fb3af47278d7eeefce34eeeb5eaf8 (patch)
treea251c87c5b1c3f2b2c27d0d8aa6d9116b168faa1 /src/librustc/infer
parent1ca505a30adb1d392d3166a34ec40b0bf584acf9 (diff)
downloadrust-6779bb485c7fb3af47278d7eeefce34eeeb5eaf8.tar.gz
rust-6779bb485c7fb3af47278d7eeefce34eeeb5eaf8.zip
capture_disjoint_fields(rust-lang#53488)
Refactoring out the HirId of the UpvarId in another struct.
Diffstat (limited to 'src/librustc/infer')
-rw-r--r--src/librustc/infer/error_reporting/mod.rs2
-rw-r--r--src/librustc/infer/error_reporting/note.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs
index f833ebc7ca7..59a490f4a01 100644
--- a/src/librustc/infer/error_reporting/mod.rs
+++ b/src/librustc/infer/error_reporting/mod.rs
@@ -1315,7 +1315,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
                 format!(" for lifetime parameter `{}` in coherence check", name)
             }
             infer::UpvarRegion(ref upvar_id, _) => {
-                let var_node_id = self.tcx.hir.hir_to_node_id(upvar_id.var_id);
+                let var_node_id = self.tcx.hir.hir_to_node_id(upvar_id.var_path.hir_id);
                 let var_name = self.tcx.hir.name(var_node_id);
                 format!(" for capture of `{}` by closure", var_name)
             }
diff --git a/src/librustc/infer/error_reporting/note.rs b/src/librustc/infer/error_reporting/note.rs
index 54d01a035a8..a539c321af3 100644
--- a/src/librustc/infer/error_reporting/note.rs
+++ b/src/librustc/infer/error_reporting/note.rs
@@ -41,7 +41,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
                               "...so that reference does not outlive borrowed content");
             }
             infer::ReborrowUpvar(span, ref upvar_id) => {
-                let var_node_id = self.tcx.hir.hir_to_node_id(upvar_id.var_id);
+                let var_node_id = self.tcx.hir.hir_to_node_id(upvar_id.var_path.hir_id);
                 let var_name = self.tcx.hir.name(var_node_id);
                 err.span_note(span,
                               &format!("...so that closure can access `{}`", var_name));
@@ -174,7 +174,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
                 err
             }
             infer::ReborrowUpvar(span, ref upvar_id) => {
-                let var_node_id = self.tcx.hir.hir_to_node_id(upvar_id.var_id);
+                let var_node_id = self.tcx.hir.hir_to_node_id(upvar_id.var_path.hir_id);
                 let var_name = self.tcx.hir.name(var_node_id);
                 let mut err = struct_span_err!(self.tcx.sess,
                                                span,