@@ -84,11 +84,7 @@ impl SingleAttributeParser for RecursionLimitParser {
8484 fn convert ( cx : & mut AcceptContext < ' _ , ' _ > , args : & ArgParser ) -> Option < AttributeKind > {
8585 let nv = cx. expect_name_value ( args, cx. attr_span , None ) ?;
8686
87- Some ( AttributeKind :: RecursionLimit {
88- limit : cx. parse_limit_int ( nv) ?,
89- attr_span : cx. attr_span ,
90- limit_span : nv. value_span ,
91- } )
87+ Some ( AttributeKind :: RecursionLimit { limit : cx. parse_limit_int ( nv) ? } )
9288 }
9389}
9490
@@ -102,11 +98,7 @@ impl SingleAttributeParser for MoveSizeLimitParser {
10298 fn convert ( cx : & mut AcceptContext < ' _ , ' _ > , args : & ArgParser ) -> Option < AttributeKind > {
10399 let nv = cx. expect_name_value ( args, cx. attr_span , None ) ?;
104100
105- Some ( AttributeKind :: MoveSizeLimit {
106- limit : cx. parse_limit_int ( nv) ?,
107- attr_span : cx. attr_span ,
108- limit_span : nv. value_span ,
109- } )
101+ Some ( AttributeKind :: MoveSizeLimit { limit : cx. parse_limit_int ( nv) ? } )
110102 }
111103}
112104
@@ -121,11 +113,7 @@ impl SingleAttributeParser for TypeLengthLimitParser {
121113 fn convert ( cx : & mut AcceptContext < ' _ , ' _ > , args : & ArgParser ) -> Option < AttributeKind > {
122114 let nv = cx. expect_name_value ( args, cx. attr_span , None ) ?;
123115
124- Some ( AttributeKind :: TypeLengthLimit {
125- limit : cx. parse_limit_int ( nv) ?,
126- attr_span : cx. attr_span ,
127- limit_span : nv. value_span ,
128- } )
116+ Some ( AttributeKind :: TypeLengthLimit { limit : cx. parse_limit_int ( nv) ? } )
129117 }
130118}
131119
@@ -139,11 +127,7 @@ impl SingleAttributeParser for PatternComplexityLimitParser {
139127 fn convert ( cx : & mut AcceptContext < ' _ , ' _ > , args : & ArgParser ) -> Option < AttributeKind > {
140128 let nv = cx. expect_name_value ( args, cx. attr_span , None ) ?;
141129
142- Some ( AttributeKind :: PatternComplexityLimit {
143- limit : cx. parse_limit_int ( nv) ?,
144- attr_span : cx. attr_span ,
145- limit_span : nv. value_span ,
146- } )
130+ Some ( AttributeKind :: PatternComplexityLimit { limit : cx. parse_limit_int ( nv) ? } )
147131 }
148132}
149133
@@ -152,7 +136,7 @@ pub(crate) struct NoCoreParser;
152136impl NoArgsAttributeParser for NoCoreParser {
153137 const PATH : & [ Symbol ] = & [ sym:: no_core] ;
154138 const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [ Allow ( Target :: Crate ) ] ) ;
155- const CREATE : fn ( Span ) -> AttributeKind = AttributeKind :: NoCore ;
139+ const CREATE : fn ( Span ) -> AttributeKind = |_| AttributeKind :: NoCore ;
156140}
157141
158142pub ( crate ) struct NoStdParser ;
@@ -161,7 +145,7 @@ impl NoArgsAttributeParser for NoStdParser {
161145 const PATH : & [ Symbol ] = & [ sym:: no_std] ;
162146 const ON_DUPLICATE : OnDuplicate = OnDuplicate :: Warn ;
163147 const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [ Allow ( Target :: Crate ) ] ) ;
164- const CREATE : fn ( Span ) -> AttributeKind = AttributeKind :: NoStd ;
148+ const CREATE : fn ( Span ) -> AttributeKind = |_| AttributeKind :: NoStd ;
165149}
166150
167151pub ( crate ) struct NoMainParser ;
@@ -178,7 +162,7 @@ pub(crate) struct RustcCoherenceIsCoreParser;
178162impl NoArgsAttributeParser for RustcCoherenceIsCoreParser {
179163 const PATH : & [ Symbol ] = & [ sym:: rustc_coherence_is_core] ;
180164 const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [ Allow ( Target :: Crate ) ] ) ;
181- const CREATE : fn ( Span ) -> AttributeKind = AttributeKind :: RustcCoherenceIsCore ;
165+ const CREATE : fn ( Span ) -> AttributeKind = |_| AttributeKind :: RustcCoherenceIsCore ;
182166}
183167
184168pub ( crate ) struct WindowsSubsystemParser ;
@@ -204,7 +188,7 @@ impl SingleAttributeParser for WindowsSubsystemParser {
204188 }
205189 } ;
206190
207- Some ( AttributeKind :: WindowsSubsystem ( kind, cx . attr_span ) )
191+ Some ( AttributeKind :: WindowsSubsystem ( kind) )
208192 }
209193}
210194
@@ -316,7 +300,7 @@ pub(crate) struct RegisterToolParser;
316300impl CombineAttributeParser for RegisterToolParser {
317301 const PATH : & [ Symbol ] = & [ sym:: register_tool] ;
318302 type Item = Ident ;
319- const CONVERT : ConvertFn < Self :: Item > = AttributeKind :: RegisterTool ;
303+ const CONVERT : ConvertFn < Self :: Item > = |tools , _span| AttributeKind :: RegisterTool ( tools ) ;
320304 const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( ALL_TARGETS ) ;
321305 const TEMPLATE : AttributeTemplate = template ! ( List : & [ "tool1, tool2, ..." ] ) ;
322306
0 commit comments