@@ -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, ..] => {
@@ -451,11 +456,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
451
456
}
452
457
}
453
458
454
- /// Checks that `#[no_sanitize(..)]` is applied to a function or method.
455
- fn check_no_sanitize ( & self , hir_id : HirId , attr : & Attribute , span : Span , target : Target ) {
456
- self . check_applied_to_fn_or_method ( hir_id, attr, span, target)
457
- }
458
-
459
459
fn check_generic_attr (
460
460
& self ,
461
461
hir_id : HirId ,
@@ -1603,30 +1603,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
1603
1603
}
1604
1604
}
1605
1605
1606
- /// Checks that the `#[rustc_lint_query_instability]` attribute is only applied to a function
1607
- /// or method.
1608
- fn check_rustc_lint_query_instability (
1609
- & self ,
1610
- hir_id : HirId ,
1611
- attr : & Attribute ,
1612
- span : Span ,
1613
- target : Target ,
1614
- ) {
1615
- self . check_applied_to_fn_or_method ( hir_id, attr, span, target)
1616
- }
1617
-
1618
- /// Checks that the `#[rustc_lint_diagnostics]` attribute is only applied to a function or
1619
- /// method.
1620
- fn check_rustc_lint_diagnostics (
1621
- & self ,
1622
- hir_id : HirId ,
1623
- attr : & Attribute ,
1624
- span : Span ,
1625
- target : Target ,
1626
- ) {
1627
- self . check_applied_to_fn_or_method ( hir_id, attr, span, target)
1628
- }
1629
-
1630
1606
/// Checks that the `#[rustc_lint_opt_ty]` attribute is only applied to a struct.
1631
1607
fn check_rustc_lint_opt_ty ( & self , attr : & Attribute , span : Span , target : Target ) {
1632
1608
match target {
0 commit comments