Skip to content

Commit f6eb392

Browse files
committed
replace NodeId with HirId in infer::SubregionOrigin
1 parent b710e08 commit f6eb392

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc/infer/error_reporting/note.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
5050
err.span_note(span,
5151
&format!("...so that captured variable `{}` does not outlive the \
5252
enclosing closure",
53-
self.tcx.hir().name(id)));
53+
self.tcx.hir().name_by_hir_id(id)));
5454
}
5555
infer::IndexSlice(span) => {
5656
err.span_note(span, "...so that slice is not indexed outside the lifetime");
@@ -220,7 +220,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
220220
E0474,
221221
"captured variable `{}` does not outlive the \
222222
enclosing closure",
223-
self.tcx.hir().name(id));
223+
self.tcx.hir().name_by_hir_id(id));
224224
self.tcx.note_and_explain_region(region_scope_tree, &mut err,
225225
"captured variable is valid for ", sup, "");
226226
self.tcx.note_and_explain_region(region_scope_tree, &mut err,

src/librustc/infer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ pub enum SubregionOrigin<'tcx> {
265265
DerefPointer(Span),
266266

267267
/// Closure bound must not outlive captured variables
268-
ClosureCapture(Span, ast::NodeId),
268+
ClosureCapture(Span, hir::HirId),
269269

270270
/// Index into slice must be within its lifetime
271271
IndexSlice(Span),

0 commit comments

Comments
 (0)