@@ -125,7 +125,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
125
125
[ sym:: inline, ..] => self . check_inline ( hir_id, attr, span, target) ,
126
126
[ sym:: coverage, ..] => self . check_coverage ( attr, span, target) ,
127
127
[ 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
+ }
129
131
[ sym:: non_exhaustive, ..] => self . check_non_exhaustive ( hir_id, attr, span, target) ,
130
132
[ sym:: marker, ..] => self . check_marker ( hir_id, attr, span, target) ,
131
133
[ sym:: target_feature, ..] => {
@@ -166,10 +168,13 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
166
168
self . check_rustc_legacy_const_generics ( hir_id, attr, span, target, item)
167
169
}
168
170
[ 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)
170
175
}
171
176
[ 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)
173
178
}
174
179
[ sym:: rustc_lint_opt_ty, ..] => self . check_rustc_lint_opt_ty ( attr, span, target) ,
175
180
[ sym:: rustc_lint_opt_deny_field_access, ..] => {
@@ -452,11 +457,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
452
457
}
453
458
}
454
459
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
-
460
460
fn check_generic_attr (
461
461
& self ,
462
462
hir_id : HirId ,
@@ -1635,30 +1635,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
1635
1635
}
1636
1636
}
1637
1637
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
-
1662
1638
/// Checks that the `#[rustc_lint_opt_ty]` attribute is only applied to a struct.
1663
1639
fn check_rustc_lint_opt_ty ( & self , attr : & Attribute , span : Span , target : Target ) {
1664
1640
match target {
0 commit comments