Remove path_span
argument to the visit_path_segment
methods.
The `visit_path_segment` method of both the AST and HIR visitors has a `path_span` argument that isn't necessary. This commit removes it. There are two very small and inconsequential functional changes. - One call to `NodeCollector::insert` now is passed a path segment identifier span instead of a full path span. This span is only used in a panic message printed in the case of an internal compiler bug. - Likewise, one call to `LifetimeCollectVisitor::record_elided_anchor` now uses a path segment identifier span instead of a full path span. This span is used to make some `'_` lifetimes.
This commit is contained in:
parent
59e7a308e4
commit
6568ef338e
13 changed files with 57 additions and 75 deletions
|
@ -245,9 +245,9 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
|
|||
});
|
||||
}
|
||||
|
||||
fn visit_path_segment(&mut self, path_span: Span, path_segment: &'hir PathSegment<'hir>) {
|
||||
self.insert(path_span, path_segment.hir_id, Node::PathSegment(path_segment));
|
||||
intravisit::walk_path_segment(self, path_span, path_segment);
|
||||
fn visit_path_segment(&mut self, path_segment: &'hir PathSegment<'hir>) {
|
||||
self.insert(path_segment.ident.span, path_segment.hir_id, Node::PathSegment(path_segment));
|
||||
intravisit::walk_path_segment(self, path_segment);
|
||||
}
|
||||
|
||||
fn visit_ty(&mut self, ty: &'hir Ty<'hir>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue