Fix weird dogfood error
This commit is contained in:
parent
7a73a25622
commit
c1b991588f
@ -104,7 +104,7 @@ struct ClosureUsageCount<'a, 'tcx> {
|
||||
cx: &'a LateContext<'tcx>,
|
||||
path: &'tcx hir::Path<'tcx>,
|
||||
count: usize,
|
||||
};
|
||||
}
|
||||
impl<'a, 'tcx> hir_visit::Visitor<'tcx> for ClosureUsageCount<'a, 'tcx> {
|
||||
type Map = Map<'tcx>;
|
||||
|
||||
@ -124,7 +124,7 @@ fn visit_expr(&mut self, expr: &'tcx hir::Expr<'tcx>) {
|
||||
fn nested_visit_map(&mut self) -> hir_visit::NestedVisitorMap<Self::Map> {
|
||||
hir_visit::NestedVisitorMap::OnlyBodies(self.cx.tcx.hir())
|
||||
}
|
||||
};
|
||||
}
|
||||
let mut closure_usage_count = ClosureUsageCount { cx, path, count: 0 };
|
||||
closure_usage_count.visit_block(block);
|
||||
closure_usage_count.count
|
||||
|
Loading…
Reference in New Issue
Block a user