@@ -258,6 +258,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
258258 | AttributeKind :: RustcNoImplicitAutorefs
259259 | AttributeKind :: RustcLayoutScalarValidRangeStart ( ..)
260260 | AttributeKind :: RustcLayoutScalarValidRangeEnd ( ..)
261+ | AttributeKind :: RustcLintOptTy
261262 | AttributeKind :: RustcScalableVector { .. }
262263 | AttributeKind :: RustcSimdMonomorphizeLaneLimit ( ..)
263264 | AttributeKind :: RustcShouldNotBeCalledOnConstItems ( ..)
@@ -317,7 +318,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
317318 [ sym:: rustc_lint_diagnostics, ..] => {
318319 self . check_applied_to_fn_or_method ( hir_id, attr. span ( ) , span, target)
319320 }
320- [ sym:: rustc_lint_opt_ty, ..] => self . check_rustc_lint_opt_ty ( attr, span, target) ,
321321 [ sym:: rustc_lint_opt_deny_field_access, ..] => {
322322 self . check_rustc_lint_opt_deny_field_access ( attr, span, target)
323323 }
@@ -1255,16 +1255,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
12551255 }
12561256 }
12571257
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-
12681258 /// Checks that the `#[rustc_lint_opt_deny_field_access]` attribute is only applied to a field.
12691259 fn check_rustc_lint_opt_deny_field_access ( & self , attr : & Attribute , span : Span , target : Target ) {
12701260 match target {
0 commit comments