@@ -169,56 +169,6 @@ macro_rules! declare_late_lint_pass {
169
169
170
170
late_lint_methods ! ( declare_late_lint_pass, [ ] , [ ' tcx] ) ;
171
171
172
- #[ macro_export]
173
- macro_rules! expand_combined_late_lint_pass_method {
174
- ( [ $( $passes: ident) ,* ] , $self: ident, $name: ident, $params: tt) => ( {
175
- $( $self. $passes. $name $params; ) *
176
- } )
177
- }
178
-
179
- #[ macro_export]
180
- macro_rules! expand_combined_late_lint_pass_methods {
181
- ( $passes: tt, [ $( $( #[ $attr: meta] ) * fn $name: ident( $( $param: ident: $arg: ty) ,* ) ; ) * ] ) => (
182
- $( fn $name( & mut self , context: & LateContext <' a, ' tcx>, $( $param: $arg) ,* ) {
183
- expand_combined_late_lint_pass_method!( $passes, self , $name, ( context, $( $param) ,* ) ) ;
184
- } ) *
185
- )
186
- }
187
-
188
- #[ macro_export]
189
- macro_rules! declare_combined_late_lint_pass {
190
- ( [ $v: vis $name: ident, [ $( $passes: ident: $constructor: expr, ) * ] ] , [ $hir: tt] , $methods: tt) => (
191
- #[ allow( non_snake_case) ]
192
- $v struct $name {
193
- $( $passes: $passes, ) *
194
- }
195
-
196
- impl $name {
197
- $v fn new( ) -> Self {
198
- Self {
199
- $( $passes: $constructor, ) *
200
- }
201
- }
202
-
203
- $v fn get_lints( ) -> LintArray {
204
- let mut lints = Vec :: new( ) ;
205
- $( lints. extend_from_slice( & $passes:: get_lints( ) ) ; ) *
206
- lints
207
- }
208
- }
209
-
210
- impl <' a, ' tcx> LateLintPass <' a, ' tcx> for $name {
211
- expand_combined_late_lint_pass_methods!( [ $( $passes) ,* ] , $methods) ;
212
- }
213
-
214
- impl LintPass for $name {
215
- fn name( & self ) -> & ' static str {
216
- panic!( )
217
- }
218
- }
219
- )
220
- }
221
-
222
172
#[ macro_export]
223
173
macro_rules! early_lint_methods {
224
174
( $macro: path, $args: tt) => (
@@ -296,56 +246,6 @@ macro_rules! declare_early_lint_pass {
296
246
297
247
early_lint_methods ! ( declare_early_lint_pass, [ ] ) ;
298
248
299
- #[ macro_export]
300
- macro_rules! expand_combined_early_lint_pass_method {
301
- ( [ $( $passes: ident) ,* ] , $self: ident, $name: ident, $params: tt) => ( {
302
- $( $self. $passes. $name $params; ) *
303
- } )
304
- }
305
-
306
- #[ macro_export]
307
- macro_rules! expand_combined_early_lint_pass_methods {
308
- ( $passes: tt, [ $( $( #[ $attr: meta] ) * fn $name: ident( $( $param: ident: $arg: ty) ,* ) ; ) * ] ) => (
309
- $( fn $name( & mut self , context: & EarlyContext <' _>, $( $param: $arg) ,* ) {
310
- expand_combined_early_lint_pass_method!( $passes, self , $name, ( context, $( $param) ,* ) ) ;
311
- } ) *
312
- )
313
- }
314
-
315
- #[ macro_export]
316
- macro_rules! declare_combined_early_lint_pass {
317
- ( [ $v: vis $name: ident, [ $( $passes: ident: $constructor: expr, ) * ] ] , $methods: tt) => (
318
- #[ allow( non_snake_case) ]
319
- $v struct $name {
320
- $( $passes: $passes, ) *
321
- }
322
-
323
- impl $name {
324
- $v fn new( ) -> Self {
325
- Self {
326
- $( $passes: $constructor, ) *
327
- }
328
- }
329
-
330
- $v fn get_lints( ) -> LintArray {
331
- let mut lints = Vec :: new( ) ;
332
- $( lints. extend_from_slice( & $passes:: get_lints( ) ) ; ) *
333
- lints
334
- }
335
- }
336
-
337
- impl EarlyLintPass for $name {
338
- expand_combined_early_lint_pass_methods!( [ $( $passes) ,* ] , $methods) ;
339
- }
340
-
341
- impl LintPass for $name {
342
- fn name( & self ) -> & ' static str {
343
- panic!( )
344
- }
345
- }
346
- )
347
- }
348
-
349
249
/// A lint pass boxed up as a trait object.
350
250
pub type EarlyLintPassObject = Box < dyn EarlyLintPass + sync:: Send + sync:: Sync + ' static > ;
351
251
pub type LateLintPassObject =
0 commit comments