@@ -354,7 +354,7 @@ pub trait WithSearchPat<'cx> {
354
354
fn span ( & self ) -> Span ;
355
355
}
356
356
macro_rules! impl_with_search_pat {
357
- ( $cx: ident: $ty: ident with $fn: ident $( ( $tcx: ident) ) ? && $span_method : ident$ ( $par : tt ) ? ) => {
357
+ ( $cx: ident: $ty: ident with $fn: ident $( ( $tcx: ident) ) ?) => {
358
358
impl <' cx> WithSearchPat <' cx> for $ty<' cx> {
359
359
type Context = $cx<' cx>;
360
360
#[ allow( unused_variables) ]
@@ -363,19 +363,18 @@ macro_rules! impl_with_search_pat {
363
363
$fn( $( $tcx, ) ? self )
364
364
}
365
365
fn span( & self ) -> Span {
366
- self . $span_method$ ( $par ) ?
366
+ self . span
367
367
}
368
368
}
369
369
} ;
370
370
}
371
- impl_with_search_pat ! ( LateContext : Expr with expr_search_pat( tcx) && span) ;
372
- impl_with_search_pat ! ( LateContext : Item with item_search_pat && span) ;
373
- impl_with_search_pat ! ( LateContext : TraitItem with trait_item_search_pat && span) ;
374
- impl_with_search_pat ! ( LateContext : ImplItem with impl_item_search_pat && span) ;
375
- impl_with_search_pat ! ( LateContext : FieldDef with field_def_search_pat && span) ;
376
- impl_with_search_pat ! ( LateContext : Variant with variant_search_pat && span) ;
377
- impl_with_search_pat ! ( LateContext : Ty with ty_search_pat && span) ;
378
- impl_with_search_pat ! ( LateContext : QPath with qpath_search_pat && span( ) ) ;
371
+ impl_with_search_pat ! ( LateContext : Expr with expr_search_pat( tcx) ) ;
372
+ impl_with_search_pat ! ( LateContext : Item with item_search_pat) ;
373
+ impl_with_search_pat ! ( LateContext : TraitItem with trait_item_search_pat) ;
374
+ impl_with_search_pat ! ( LateContext : ImplItem with impl_item_search_pat) ;
375
+ impl_with_search_pat ! ( LateContext : FieldDef with field_def_search_pat) ;
376
+ impl_with_search_pat ! ( LateContext : Variant with variant_search_pat) ;
377
+ impl_with_search_pat ! ( LateContext : Ty with ty_search_pat) ;
379
378
380
379
impl < ' cx > WithSearchPat < ' cx > for ( & FnKind < ' cx > , & Body < ' cx > , HirId , Span ) {
381
380
type Context = LateContext < ' cx > ;
0 commit comments