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,
|
err.span_note(span,
|
||||||
&format!("...so that captured variable `{}` does not outlive the \
|
&format!("...so that captured variable `{}` does not outlive the \
|
||||||
enclosing closure",
|
enclosing closure",
|
||||||
self.tcx.hir().name(id)));
|
self.tcx.hir().name_by_hir_id(id)));
|
||||||
}
|
}
|
||||||
infer::IndexSlice(span) => {
|
infer::IndexSlice(span) => {
|
||||||
err.span_note(span, "...so that slice is not indexed outside the lifetime");
|
err.span_note(span, "...so that slice is not indexed outside the lifetime");
|
||||||
|
@ -220,7 +220,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||||
E0474,
|
E0474,
|
||||||
"captured variable `{}` does not outlive the \
|
"captured variable `{}` does not outlive the \
|
||||||
enclosing closure",
|
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,
|
self.tcx.note_and_explain_region(region_scope_tree, &mut err,
|
||||||
"captured variable is valid for ", sup, "");
|
"captured variable is valid for ", sup, "");
|
||||||
self.tcx.note_and_explain_region(region_scope_tree, &mut err,
|
self.tcx.note_and_explain_region(region_scope_tree, &mut err,
|
||||||
|
|
|
@ -265,7 +265,7 @@ pub enum SubregionOrigin<'tcx> {
|
||||||
DerefPointer(Span),
|
DerefPointer(Span),
|
||||||
|
|
||||||
/// Closure bound must not outlive captured variables
|
/// Closure bound must not outlive captured variables
|
||||||
ClosureCapture(Span, ast::NodeId),
|
ClosureCapture(Span, hir::HirId),
|
||||||
|
|
||||||
/// Index into slice must be within its lifetime
|
/// Index into slice must be within its lifetime
|
||||||
IndexSlice(Span),
|
IndexSlice(Span),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue