File tree Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -143,13 +143,13 @@ impl Msrv {
143143 None
144144 }
145145
146- pub fn enter_lint_attrs ( & mut self , sess : & Session , attrs : & [ Attribute ] ) {
146+ pub fn check_attributes ( & mut self , sess : & Session , attrs : & [ Attribute ] ) {
147147 if let Some ( version) = Self :: parse_attr ( sess, attrs) {
148148 self . stack . push ( version) ;
149149 }
150150 }
151151
152- pub fn exit_lint_attrs ( & mut self , sess : & Session , attrs : & [ Attribute ] ) {
152+ pub fn check_attributes_post ( & mut self , sess : & Session , attrs : & [ Attribute ] ) {
153153 if Self :: parse_attr ( sess, attrs) . is_some ( ) {
154154 self . stack . pop ( ) ;
155155 }
Original file line number Diff line number Diff line change @@ -158,10 +158,10 @@ impl<'tcx> LateLintPass<'tcx> for CognitiveComplexity {
158158 }
159159 }
160160
161- fn enter_lint_attrs ( & mut self , cx : & LateContext < ' tcx > , attrs : & ' tcx [ Attribute ] ) {
161+ fn check_attributes ( & mut self , cx : & LateContext < ' tcx > , attrs : & ' tcx [ Attribute ] ) {
162162 self . limit . push_attrs ( cx. sess ( ) , attrs, "cognitive_complexity" ) ;
163163 }
164- fn exit_lint_attrs ( & mut self , cx : & LateContext < ' tcx > , attrs : & ' tcx [ Attribute ] ) {
164+ fn check_attributes_post ( & mut self , cx : & LateContext < ' tcx > , attrs : & ' tcx [ Attribute ] ) {
165165 self . limit . pop_attrs ( cx. sess ( ) , attrs, "cognitive_complexity" ) ;
166166 }
167167}
Original file line number Diff line number Diff line change @@ -162,12 +162,12 @@ impl MissingDoc {
162162impl_lint_pass ! ( MissingDoc => [ MISSING_DOCS_IN_PRIVATE_ITEMS ] ) ;
163163
164164impl < ' tcx > LateLintPass < ' tcx > for MissingDoc {
165- fn enter_lint_attrs ( & mut self , _: & LateContext < ' tcx > , attrs : & ' tcx [ ast:: Attribute ] ) {
165+ fn check_attributes ( & mut self , _: & LateContext < ' tcx > , attrs : & ' tcx [ ast:: Attribute ] ) {
166166 let doc_hidden = self . doc_hidden ( ) || is_doc_hidden ( attrs) ;
167167 self . doc_hidden_stack . push ( doc_hidden) ;
168168 }
169169
170- fn exit_lint_attrs ( & mut self , _: & LateContext < ' tcx > , _: & ' tcx [ ast:: Attribute ] ) {
170+ fn check_attributes_post ( & mut self , _: & LateContext < ' tcx > , _: & ' tcx [ ast:: Attribute ] ) {
171171 self . doc_hidden_stack . pop ( ) . expect ( "empty doc_hidden_stack" ) ;
172172 }
173173
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ impl LateLintPass<'_> for MsrvAttrImpl {
4242 . filter ( |t| matches ! ( t. unpack( ) , GenericArgKind :: Type ( _) ) )
4343 . any ( |t| match_type ( cx, t. expect_ty ( ) , & paths:: MSRV ) )
4444 } )
45- && !items. iter ( ) . any ( |item| item. ident . name == sym ! ( enter_lint_attrs ) )
45+ && !items. iter ( ) . any ( |item| item. ident . name == sym ! ( check_attributes ) )
4646 {
4747 let context = if is_late_pass { "LateContext" } else { "EarlyContext" } ;
4848 let lint_pass = if is_late_pass { "LateLintPass" } else { "EarlyLintPass" } ;
Original file line number Diff line number Diff line change @@ -131,14 +131,14 @@ use rustc_middle::hir::nested_filter;
131131#[ macro_export]
132132macro_rules! extract_msrv_attr {
133133 ( $context: ident) => {
134- fn enter_lint_attrs ( & mut self , cx: & rustc_lint:: $context<' _>, attrs: & [ rustc_ast:: ast:: Attribute ] ) {
134+ fn check_attributes ( & mut self , cx: & rustc_lint:: $context<' _>, attrs: & [ rustc_ast:: ast:: Attribute ] ) {
135135 let sess = rustc_lint:: LintContext :: sess( cx) ;
136- self . msrv. enter_lint_attrs ( sess, attrs) ;
136+ self . msrv. check_attributes ( sess, attrs) ;
137137 }
138138
139- fn exit_lint_attrs ( & mut self , cx: & rustc_lint:: $context<' _>, attrs: & [ rustc_ast:: ast:: Attribute ] ) {
139+ fn check_attributes_post ( & mut self , cx: & rustc_lint:: $context<' _>, attrs: & [ rustc_ast:: ast:: Attribute ] ) {
140140 let sess = rustc_lint:: LintContext :: sess( cx) ;
141- self . msrv. exit_lint_attrs ( sess, attrs) ;
141+ self . msrv. check_attributes_post ( sess, attrs) ;
142142 }
143143 } ;
144144}
You can’t perform that action at this time.
0 commit comments