Track HirId when visiting attributes.

This commit is contained in:
Camille GILLOT 2020-12-05 17:40:19 +01:00
parent 6b5d2de97e
commit 27ef0eeaa4
5 changed files with 16 additions and 11 deletions

View file

@ -554,7 +554,7 @@ impl intravisit::Visitor<'tcx> for FindAllAttrs<'_, 'tcx> {
intravisit::NestedVisitorMap::All(self.tcx.hir())
}
fn visit_attribute(&mut self, attr: &'tcx Attribute) {
fn visit_attribute(&mut self, _: hir::HirId, attr: &'tcx Attribute) {
if self.is_active_attr(attr) {
self.found_attrs.push(attr);
}