@@ -354,7 +354,7 @@ pub trait WithSearchPat<'cx> {
354354 fn span ( & self ) -> Span ;
355355}
356356macro_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) ) ?) => {
358358 impl <' cx> WithSearchPat <' cx> for $ty<' cx> {
359359 type Context = $cx<' cx>;
360360 #[ allow( unused_variables) ]
@@ -363,19 +363,18 @@ macro_rules! impl_with_search_pat {
363363 $fn( $( $tcx, ) ? self )
364364 }
365365 fn span( & self ) -> Span {
366- self . $span_method$ ( $par ) ?
366+ self . span
367367 }
368368 }
369369 } ;
370370}
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) ;
379378
380379impl < ' cx > WithSearchPat < ' cx > for ( & FnKind < ' cx > , & Body < ' cx > , HirId , Span ) {
381380 type Context = LateContext < ' cx > ;
0 commit comments