Auto merge of #98153 - nnethercote:fix-MissingDoc-quadratic-behaviour, r=cjgillot

Fix `MissingDoc` quadratic behaviour

Best reviewed one commit at a time.

r? `@cjgillot`
This commit is contained in:
bors 2022-06-18 09:57:00 +00:00
commit cdcc53b7dc
7 changed files with 16 additions and 36 deletions

View file

@ -21,7 +21,6 @@
use rustc_ast::{self as ast, Attribute, NestedMetaItem};
use rustc_data_structures::fx::FxHashSet;
use rustc_hir as hir;
use rustc_hir::def_id::LocalDefId;
use rustc_hir::intravisit;
use rustc_hir::Node as HirNode;
@ -473,7 +472,7 @@ impl<'tcx> intravisit::Visitor<'tcx> for FindAllAttrs<'tcx> {
self.tcx.hir()
}
fn visit_attribute(&mut self, _: hir::HirId, attr: &'tcx Attribute) {
fn visit_attribute(&mut self, attr: &'tcx Attribute) {
if self.is_active_attr(attr) {
self.found_attrs.push(attr);
}