@@ -9,49 +9,49 @@ use rustc_span::Span;
99
1010#[ macro_export]
1111macro_rules! late_lint_methods {
12- ( $macro: path, $args: tt, [ $hir : tt ] ) => (
13- $macro!( $args, [ $hir ] , [
14- fn check_body( a: & $hir hir:: Body <$hir >) ;
15- fn check_body_post( a: & $hir hir:: Body <$hir >) ;
12+ ( $macro: path, $args: tt) => (
13+ $macro!( $args, [
14+ fn check_body( a: & ' tcx hir:: Body <' tcx >) ;
15+ fn check_body_post( a: & ' tcx hir:: Body <' tcx >) ;
1616 fn check_crate( ) ;
1717 fn check_crate_post( ) ;
18- fn check_mod( a: & $hir hir:: Mod <$hir >, b: hir:: HirId ) ;
19- fn check_foreign_item( a: & $hir hir:: ForeignItem <$hir >) ;
20- fn check_item( a: & $hir hir:: Item <$hir >) ;
21- fn check_item_post( a: & $hir hir:: Item <$hir >) ;
22- fn check_local( a: & $hir hir:: Local <$hir >) ;
23- fn check_block( a: & $hir hir:: Block <$hir >) ;
24- fn check_block_post( a: & $hir hir:: Block <$hir >) ;
25- fn check_stmt( a: & $hir hir:: Stmt <$hir >) ;
26- fn check_arm( a: & $hir hir:: Arm <$hir >) ;
27- fn check_pat( a: & $hir hir:: Pat <$hir >) ;
28- fn check_expr( a: & $hir hir:: Expr <$hir >) ;
29- fn check_expr_post( a: & $hir hir:: Expr <$hir >) ;
30- fn check_ty( a: & $hir hir:: Ty <$hir >) ;
31- fn check_generic_param( a: & $hir hir:: GenericParam <$hir >) ;
32- fn check_generics( a: & $hir hir:: Generics <$hir >) ;
33- fn check_poly_trait_ref( a: & $hir hir:: PolyTraitRef <$hir >) ;
18+ fn check_mod( a: & ' tcx hir:: Mod <' tcx >, b: hir:: HirId ) ;
19+ fn check_foreign_item( a: & ' tcx hir:: ForeignItem <' tcx >) ;
20+ fn check_item( a: & ' tcx hir:: Item <' tcx >) ;
21+ fn check_item_post( a: & ' tcx hir:: Item <' tcx >) ;
22+ fn check_local( a: & ' tcx hir:: Local <' tcx >) ;
23+ fn check_block( a: & ' tcx hir:: Block <' tcx >) ;
24+ fn check_block_post( a: & ' tcx hir:: Block <' tcx >) ;
25+ fn check_stmt( a: & ' tcx hir:: Stmt <' tcx >) ;
26+ fn check_arm( a: & ' tcx hir:: Arm <' tcx >) ;
27+ fn check_pat( a: & ' tcx hir:: Pat <' tcx >) ;
28+ fn check_expr( a: & ' tcx hir:: Expr <' tcx >) ;
29+ fn check_expr_post( a: & ' tcx hir:: Expr <' tcx >) ;
30+ fn check_ty( a: & ' tcx hir:: Ty <' tcx >) ;
31+ fn check_generic_param( a: & ' tcx hir:: GenericParam <' tcx >) ;
32+ fn check_generics( a: & ' tcx hir:: Generics <' tcx >) ;
33+ fn check_poly_trait_ref( a: & ' tcx hir:: PolyTraitRef <' tcx >) ;
3434 fn check_fn(
35- a: rustc_hir:: intravisit:: FnKind <$hir >,
36- b: & $hir hir:: FnDecl <$hir >,
37- c: & $hir hir:: Body <$hir >,
35+ a: rustc_hir:: intravisit:: FnKind <' tcx >,
36+ b: & ' tcx hir:: FnDecl <' tcx >,
37+ c: & ' tcx hir:: Body <' tcx >,
3838 d: Span ,
3939 e: hir:: HirId ) ;
40- fn check_trait_item( a: & $hir hir:: TraitItem <$hir >) ;
41- fn check_impl_item( a: & $hir hir:: ImplItem <$hir >) ;
42- fn check_impl_item_post( a: & $hir hir:: ImplItem <$hir >) ;
43- fn check_struct_def( a: & $hir hir:: VariantData <$hir >) ;
44- fn check_field_def( a: & $hir hir:: FieldDef <$hir >) ;
45- fn check_variant( a: & $hir hir:: Variant <$hir >) ;
46- fn check_path( a: & hir:: Path <$hir >, b: hir:: HirId ) ;
47- fn check_attribute( a: & $hir ast:: Attribute ) ;
40+ fn check_trait_item( a: & ' tcx hir:: TraitItem <' tcx >) ;
41+ fn check_impl_item( a: & ' tcx hir:: ImplItem <' tcx >) ;
42+ fn check_impl_item_post( a: & ' tcx hir:: ImplItem <' tcx >) ;
43+ fn check_struct_def( a: & ' tcx hir:: VariantData <' tcx >) ;
44+ fn check_field_def( a: & ' tcx hir:: FieldDef <' tcx >) ;
45+ fn check_variant( a: & ' tcx hir:: Variant <' tcx >) ;
46+ fn check_path( a: & hir:: Path <' tcx >, b: hir:: HirId ) ;
47+ fn check_attribute( a: & ' tcx ast:: Attribute ) ;
4848
4949 /// Called when entering a syntax node that can have lint attributes such
5050 /// as `#[allow(...)]`. Called with *all* the attributes of that node.
51- fn enter_lint_attrs( a: & $hir [ ast:: Attribute ] ) ;
51+ fn enter_lint_attrs( a: & ' tcx [ ast:: Attribute ] ) ;
5252
5353 /// Counterpart to `enter_lint_attrs`.
54- fn exit_lint_attrs( a: & $hir [ ast:: Attribute ] ) ;
54+ fn exit_lint_attrs( a: & ' tcx [ ast:: Attribute ] ) ;
5555 ] ) ;
5656 )
5757}
@@ -66,14 +66,14 @@ macro_rules! late_lint_methods {
6666// contains a few lint-specific methods with no equivalent in `Visitor`.
6767
6868macro_rules! declare_late_lint_pass {
69- ( [ ] , [ $hir : tt ] , [ $ ( $( #[ $attr: meta] ) * fn $name: ident( $( $param: ident: $arg: ty) ,* ) ; ) * ] ) => (
70- pub trait LateLintPass <$hir >: LintPass {
71- $( #[ inline( always) ] fn $name( & mut self , _: & LateContext <$hir >, $( _: $arg) ,* ) { } ) *
69+ ( [ ] , [ $( $( #[ $attr: meta] ) * fn $name: ident( $( $param: ident: $arg: ty) ,* ) ; ) * ] ) => (
70+ pub trait LateLintPass <' tcx >: LintPass {
71+ $( #[ inline( always) ] fn $name( & mut self , _: & LateContext <' tcx >, $( _: $arg) ,* ) { } ) *
7272 }
7373 )
7474}
7575
76- late_lint_methods ! ( declare_late_lint_pass, [ ] , [ ' tcx ] ) ;
76+ late_lint_methods ! ( declare_late_lint_pass, [ ] ) ;
7777
7878impl LateLintPass < ' _ > for HardwiredLints { }
7979
@@ -95,7 +95,7 @@ macro_rules! expand_combined_late_lint_pass_methods {
9595
9696#[ macro_export]
9797macro_rules! declare_combined_late_lint_pass {
98- ( [ $v: vis $name: ident, [ $( $passes: ident: $constructor: expr, ) * ] ] , [ $hir : tt ] , $methods: tt) => (
98+ ( [ $v: vis $name: ident, [ $( $passes: ident: $constructor: expr, ) * ] ] , $methods: tt) => (
9999 #[ allow( non_snake_case) ]
100100 $v struct $name {
101101 $( $passes: $passes, ) *
0 commit comments