@@ -125,7 +125,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
125125 [ sym:: inline, ..] => self . check_inline ( hir_id, attr, span, target) ,
126126 [ sym:: coverage, ..] => self . check_coverage ( attr, span, target) ,
127127 [ sym:: optimize, ..] => self . check_optimize ( hir_id, attr, target) ,
128- [ sym:: no_sanitize, ..] => self . check_no_sanitize ( hir_id, attr, span, target) ,
128+ [ sym:: no_sanitize, ..] => {
129+ self . check_applied_to_fn_or_method ( hir_id, attr, span, target)
130+ }
129131 [ sym:: non_exhaustive, ..] => self . check_non_exhaustive ( hir_id, attr, span, target) ,
130132 [ sym:: marker, ..] => self . check_marker ( hir_id, attr, span, target) ,
131133 [ sym:: target_feature, ..] => {
@@ -166,10 +168,13 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
166168 self . check_rustc_legacy_const_generics ( hir_id, attr, span, target, item)
167169 }
168170 [ sym:: rustc_lint_query_instability, ..] => {
169- self . check_rustc_lint_query_instability ( hir_id, attr, span, target)
171+ self . check_applied_to_fn_or_method ( hir_id, attr, span, target)
172+ }
173+ [ sym:: rustc_lint_untracked_query_information, ..] => {
174+ self . check_applied_to_fn_or_method ( hir_id, attr, span, target)
170175 }
171176 [ sym:: rustc_lint_diagnostics, ..] => {
172- self . check_rustc_lint_diagnostics ( hir_id, attr, span, target)
177+ self . check_applied_to_fn_or_method ( hir_id, attr, span, target)
173178 }
174179 [ sym:: rustc_lint_opt_ty, ..] => self . check_rustc_lint_opt_ty ( attr, span, target) ,
175180 [ sym:: rustc_lint_opt_deny_field_access, ..] => {
@@ -452,11 +457,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
452457 }
453458 }
454459
455- /// Checks that `#[no_sanitize(..)]` is applied to a function or method.
456- fn check_no_sanitize ( & self , hir_id : HirId , attr : & Attribute , span : Span , target : Target ) {
457- self . check_applied_to_fn_or_method ( hir_id, attr, span, target)
458- }
459-
460460 fn check_generic_attr (
461461 & self ,
462462 hir_id : HirId ,
@@ -1635,30 +1635,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
16351635 }
16361636 }
16371637
1638- /// Checks that the `#[rustc_lint_query_instability]` attribute is only applied to a function
1639- /// or method.
1640- fn check_rustc_lint_query_instability (
1641- & self ,
1642- hir_id : HirId ,
1643- attr : & Attribute ,
1644- span : Span ,
1645- target : Target ,
1646- ) {
1647- self . check_applied_to_fn_or_method ( hir_id, attr, span, target)
1648- }
1649-
1650- /// Checks that the `#[rustc_lint_diagnostics]` attribute is only applied to a function or
1651- /// method.
1652- fn check_rustc_lint_diagnostics (
1653- & self ,
1654- hir_id : HirId ,
1655- attr : & Attribute ,
1656- span : Span ,
1657- target : Target ,
1658- ) {
1659- self . check_applied_to_fn_or_method ( hir_id, attr, span, target)
1660- }
1661-
16621638 /// Checks that the `#[rustc_lint_opt_ty]` attribute is only applied to a struct.
16631639 fn check_rustc_lint_opt_ty ( & self , attr : & Attribute , span : Span , target : Target ) {
16641640 match target {
0 commit comments