@@ -258,6 +258,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
258258 | AttributeKind :: RustcNoImplicitAutorefs
259259 | AttributeKind :: RustcLayoutScalarValidRangeStart ( ..)
260260 | AttributeKind :: RustcLayoutScalarValidRangeEnd ( ..)
261+ | AttributeKind :: RustcLintOptTy
261262 | AttributeKind :: RustcNeverReturnsNullPointer
262263 | AttributeKind :: RustcScalableVector { .. }
263264 | AttributeKind :: RustcSimdMonomorphizeLaneLimit ( ..)
@@ -315,7 +316,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
315316 [ sym:: rustc_lint_diagnostics, ..] => {
316317 self . check_applied_to_fn_or_method ( hir_id, attr. span ( ) , span, target)
317318 }
318- [ sym:: rustc_lint_opt_ty, ..] => self . check_rustc_lint_opt_ty ( attr, span, target) ,
319319 [ sym:: rustc_lint_opt_deny_field_access, ..] => {
320320 self . check_rustc_lint_opt_deny_field_access ( attr, span, target)
321321 }
@@ -1253,16 +1253,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
12531253 }
12541254 }
12551255
1256- /// Checks that the `#[rustc_lint_opt_ty]` attribute is only applied to a struct.
1257- fn check_rustc_lint_opt_ty ( & self , attr : & Attribute , span : Span , target : Target ) {
1258- match target {
1259- Target :: Struct => { }
1260- _ => {
1261- self . dcx ( ) . emit_err ( errors:: RustcLintOptTy { attr_span : attr. span ( ) , span } ) ;
1262- }
1263- }
1264- }
1265-
12661256 /// Checks that the `#[rustc_lint_opt_deny_field_access]` attribute is only applied to a field.
12671257 fn check_rustc_lint_opt_deny_field_access ( & self , attr : & Attribute , span : Span , target : Target ) {
12681258 match target {
0 commit comments