From f6eb39203bcd8add887f72c1633cb46c50a13bf4 Mon Sep 17 00:00:00 2001 From: ljedrz Date: Wed, 19 Jun 2019 15:33:32 +0200 Subject: [PATCH] replace NodeId with HirId in infer::SubregionOrigin --- src/librustc/infer/error_reporting/note.rs | 4 ++-- src/librustc/infer/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc/infer/error_reporting/note.rs b/src/librustc/infer/error_reporting/note.rs index cc7c13cea7d9..3c6253a96048 100644 --- a/src/librustc/infer/error_reporting/note.rs +++ b/src/librustc/infer/error_reporting/note.rs @@ -50,7 +50,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { err.span_note(span, &format!("...so that captured variable `{}` does not outlive the \ enclosing closure", - self.tcx.hir().name(id))); + self.tcx.hir().name_by_hir_id(id))); } infer::IndexSlice(span) => { err.span_note(span, "...so that slice is not indexed outside the lifetime"); @@ -220,7 +220,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { E0474, "captured variable `{}` does not outlive the \ enclosing closure", - self.tcx.hir().name(id)); + self.tcx.hir().name_by_hir_id(id)); self.tcx.note_and_explain_region(region_scope_tree, &mut err, "captured variable is valid for ", sup, ""); self.tcx.note_and_explain_region(region_scope_tree, &mut err, diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs index fc46fe383c97..5c5e6303b824 100644 --- a/src/librustc/infer/mod.rs +++ b/src/librustc/infer/mod.rs @@ -265,7 +265,7 @@ pub enum SubregionOrigin<'tcx> { DerefPointer(Span), /// Closure bound must not outlive captured variables - ClosureCapture(Span, ast::NodeId), + ClosureCapture(Span, hir::HirId), /// Index into slice must be within its lifetime IndexSlice(Span),