@@ -255,8 +255,11 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
255255 | AttributeKind :: MacroUse { .. }
256256 | AttributeKind :: MacroEscape ( .. )
257257 | AttributeKind :: NoLink
258+ | AttributeKind :: RustcNoImplicitAutorefs
258259 | AttributeKind :: RustcLayoutScalarValidRangeStart ( ..)
259260 | AttributeKind :: RustcLayoutScalarValidRangeEnd ( ..)
261+ | AttributeKind :: RustcLintOptTy
262+ | AttributeKind :: RustcLintQueryInstability
260263 | AttributeKind :: RustcNeverReturnsNullPointer
261264 | AttributeKind :: RustcScalableVector { .. }
262265 | AttributeKind :: RustcSimdMonomorphizeLaneLimit ( ..)
@@ -305,19 +308,12 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
305308 self . check_diagnostic_on_const ( attr. span ( ) , hir_id, target, item)
306309 }
307310 [ sym:: thread_local, ..] => self . check_thread_local ( attr, span, target) ,
308- [ sym:: rustc_no_implicit_autorefs, ..] => {
309- self . check_applied_to_fn_or_method ( hir_id, attr. span ( ) , span, target)
310- }
311- [ sym:: rustc_lint_query_instability, ..] => {
312- self . check_applied_to_fn_or_method ( hir_id, attr. span ( ) , span, target)
313- }
314311 [ sym:: rustc_lint_untracked_query_information, ..] => {
315312 self . check_applied_to_fn_or_method ( hir_id, attr. span ( ) , span, target)
316313 }
317314 [ sym:: rustc_lint_diagnostics, ..] => {
318315 self . check_applied_to_fn_or_method ( hir_id, attr. span ( ) , span, target)
319316 }
320- [ sym:: rustc_lint_opt_ty, ..] => self . check_rustc_lint_opt_ty ( attr, span, target) ,
321317 [ sym:: rustc_lint_opt_deny_field_access, ..] => {
322318 self . check_rustc_lint_opt_deny_field_access ( attr, span, target)
323319 }
@@ -1255,16 +1251,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
12551251 }
12561252 }
12571253
1258- /// Checks that the `#[rustc_lint_opt_ty]` attribute is only applied to a struct.
1259- fn check_rustc_lint_opt_ty ( & self , attr : & Attribute , span : Span , target : Target ) {
1260- match target {
1261- Target :: Struct => { }
1262- _ => {
1263- self . dcx ( ) . emit_err ( errors:: RustcLintOptTy { attr_span : attr. span ( ) , span } ) ;
1264- }
1265- }
1266- }
1267-
12681254 /// Checks that the `#[rustc_lint_opt_deny_field_access]` attribute is only applied to a field.
12691255 fn check_rustc_lint_opt_deny_field_access ( & self , attr : & Attribute , span : Span , target : Target ) {
12701256 match target {
0 commit comments