@@ -297,6 +297,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
297297 | AttributeKind :: RustcPassIndirectlyInNonRusticAbis ( ..)
298298 | AttributeKind :: PinV2 ( ..)
299299 | AttributeKind :: WindowsSubsystem ( ..)
300+ | AttributeKind :: ThreadLocal
300301 ) => { /* do nothing */ }
301302 Attribute :: Unparsed ( attr_item) => {
302303 style = Some ( attr_item. style ) ;
@@ -310,7 +311,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
310311 [ sym:: diagnostic, sym:: on_const, ..] => {
311312 self . check_diagnostic_on_const ( attr. span ( ) , hir_id, target, item)
312313 }
313- [ sym:: thread_local, ..] => self . check_thread_local ( attr, span, target) ,
314314 [ sym:: rustc_clean, ..]
315315 | [ sym:: rustc_dirty, ..]
316316 | [ sym:: rustc_if_this_changed, ..]
@@ -768,19 +768,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
768768 }
769769 }
770770
771- /// Checks if the `#[thread_local]` attribute on `item` is valid.
772- fn check_thread_local ( & self , attr : & Attribute , span : Span , target : Target ) {
773- match target {
774- Target :: ForeignStatic | Target :: Static => { }
775- _ => {
776- self . dcx ( ) . emit_err ( errors:: AttrShouldBeAppliedToStatic {
777- attr_span : attr. span ( ) ,
778- defn_span : span,
779- } ) ;
780- }
781- }
782- }
783-
784771 fn check_doc_alias_value ( & self , span : Span , hir_id : HirId , target : Target , alias : Symbol ) {
785772 if let Some ( location) = match target {
786773 Target :: AssocTy => {
0 commit comments