Skip to content

Commit ad7b4d5

Browse files
committed
Move a comment to the right place.
This comment on the HIR `visit_path_segment` is supposed be on the AST `visit_path_segment`.
1 parent 22379bd commit ad7b4d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_passes/src/hir_stats.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,6 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
301301
hir_visit::walk_path(self, path)
302302
}
303303

304-
// `PathSegment` has one inline use (in `ast::ExprKind::MethodCall`) and
305-
// one non-inline use (in `Path::segments`). The latter case is more common
306-
// than the former case, so we implement this visitor and tolerate the
307-
// double counting in the former case.
308304
fn visit_path_segment(&mut self, path_span: Span, path_segment: &'v hir::PathSegment<'v>) {
309305
self.record("PathSegment", Id::None, path_segment);
310306
hir_visit::walk_path_segment(self, path_span, path_segment)
@@ -509,6 +505,10 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
509505
// common, so we don't implement `visit_use_tree` and tolerate the missed
510506
// coverage in the latter case.
511507

508+
// `PathSegment` has one inline use (in `ast::ExprKind::MethodCall`) and
509+
// one non-inline use (in `ast::Path::segments`). The latter case is more
510+
// common than the former case, so we implement this visitor and tolerate
511+
// the double counting in the former case.
512512
fn visit_path_segment(&mut self, path_span: Span, path_segment: &'v ast::PathSegment) {
513513
self.record("PathSegment", Id::None, path_segment);
514514
ast_visit::walk_path_segment(self, path_span, path_segment)

0 commit comments

Comments
 (0)