File tree Expand file tree Collapse file tree 2 files changed +5
-19
lines changed
Expand file tree Collapse file tree 2 files changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -169,8 +169,11 @@ AttributeChecker::go (AST::Crate &crate)
169169void
170170AttributeChecker::visit (AST::Crate &crate)
171171{
172- check_inner_attributes (crate.get_inner_attrs ());
173- check_attributes (crate.get_inner_attrs ());
172+ for (auto &attr : crate.get_inner_attrs ())
173+ {
174+ check_inner_attribute (attr);
175+ check_attribute (attr);
176+ }
174177
175178 for (auto &item : crate.items )
176179 item->accept_vis (*this );
@@ -455,13 +458,6 @@ AttributeChecker::check_inner_attribute (const AST::Attribute &attribute)
455458 " attribute cannot be used at crate level" );
456459}
457460
458- void
459- AttributeChecker::check_inner_attributes (const AST::AttrVec &attributes)
460- {
461- for (auto &attr : attributes)
462- check_inner_attribute (attr);
463- }
464-
465461static void
466462check_link_section_attribute (const AST::Attribute &attribute)
467463{
@@ -524,12 +520,6 @@ AttributeChecker::check_attribute (const AST::Attribute &attribute)
524520 else if (result.name == Attrs::DEPRECATED)
525521 check_deprecated_attribute (attribute);
526522}
527- void
528- AttributeChecker::check_attributes (const AST::AttrVec &attributes)
529- {
530- for (auto &attr : attributes)
531- check_attribute (attr);
532- }
533523
534524void
535525AttributeChecker::visit (AST::Token &)
Original file line number Diff line number Diff line change @@ -105,12 +105,8 @@ class AttributeChecker : public AST::DefaultASTVisitor
105105
106106 /* Check the validity of an inner attribute */
107107 void check_inner_attribute (const AST::Attribute &attribute);
108- /* Check the validy of all inner attributes */
109- void check_inner_attributes (const AST::AttrVec &attributes);
110108 /* Check the validity of a given attribute */
111109 void check_attribute (const AST::Attribute &attribute);
112- /* Check the validity of all given attributes */
113- void check_attributes (const AST::AttrVec &attributes);
114110
115111 // rust-ast.h
116112 void visit (AST::Crate &crate) override ;
You can’t perform that action at this time.
0 commit comments