replace NodeId with HirId in infer::SubregionOrigin
This commit is contained in:
parent
b710e08868
commit
f6eb39203b
2 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue