@@ -18,7 +18,7 @@ pub(crate) struct OptimizeParser;
1818
1919impl SingleAttributeParser for OptimizeParser {
2020 const PATH : & [ Symbol ] = & [ sym:: optimize] ;
21- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [
21+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowList ( & [
2222 Allow ( Target :: Fn ) ,
2323 Allow ( Target :: Closure ) ,
2424 Allow ( Target :: Method ( MethodKind :: Trait { body : true } ) ) ,
@@ -51,7 +51,7 @@ pub(crate) struct ColdParser;
5151impl NoArgsAttributeParser for ColdParser {
5252 const PATH : & [ Symbol ] = & [ sym:: cold] ;
5353 const ON_DUPLICATE : OnDuplicate = OnDuplicate :: Warn ;
54- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowListWarnRest ( & [
54+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowListWarnRest ( & [
5555 Allow ( Target :: Fn ) ,
5656 Allow ( Target :: Method ( MethodKind :: Trait { body : true } ) ) ,
5757 Allow ( Target :: Method ( MethodKind :: TraitImpl ) ) ,
@@ -67,7 +67,7 @@ pub(crate) struct CoverageParser;
6767
6868impl SingleAttributeParser for CoverageParser {
6969 const PATH : & [ Symbol ] = & [ sym:: coverage] ;
70- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [
70+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowList ( & [
7171 Allow ( Target :: Fn ) ,
7272 Allow ( Target :: Closure ) ,
7373 Allow ( Target :: Method ( MethodKind :: Trait { body : true } ) ) ,
@@ -114,7 +114,7 @@ impl SingleAttributeParser for ExportNameParser {
114114 note : "the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them" ,
115115 unsafe_since : Some ( Edition2024 ) ,
116116 } ;
117- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [
117+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowList ( & [
118118 Allow ( Target :: Static ) ,
119119 Allow ( Target :: Fn ) ,
120120 Allow ( Target :: Method ( MethodKind :: Inherent ) ) ,
@@ -151,7 +151,7 @@ pub(crate) struct RustcObjcClassParser;
151151
152152impl SingleAttributeParser for RustcObjcClassParser {
153153 const PATH : & [ rustc_span:: Symbol ] = & [ sym:: rustc_objc_class] ;
154- const ALLOWED_TARGETS : AllowedTargets =
154+ const ALLOWED_TARGETS : AllowedTargets < ' _ > =
155155 AllowedTargets :: AllowList ( & [ Allow ( Target :: ForeignStatic ) ] ) ;
156156 const TEMPLATE : AttributeTemplate = template ! ( NameValueStr : "ClassName" ) ;
157157 const STABILITY : AttributeStability = unstable ! ( rustc_attrs) ;
@@ -179,7 +179,7 @@ pub(crate) struct RustcObjcSelectorParser;
179179
180180impl SingleAttributeParser for RustcObjcSelectorParser {
181181 const PATH : & [ rustc_span:: Symbol ] = & [ sym:: rustc_objc_selector] ;
182- const ALLOWED_TARGETS : AllowedTargets =
182+ const ALLOWED_TARGETS : AllowedTargets < ' _ > =
183183 AllowedTargets :: AllowList ( & [ Allow ( Target :: ForeignStatic ) ] ) ;
184184 const TEMPLATE : AttributeTemplate = template ! ( NameValueStr : "methodName" ) ;
185185 const STABILITY : AttributeStability = unstable ! ( rustc_attrs) ;
@@ -226,7 +226,7 @@ impl AttributeParser for NakedParser {
226226 note : "the `#[naked]` attribute adds the safety obligation that the function's body must respect the function’s calling convention, uphold its signature, and either return or diverge (i.e., not fall through past the end of the assembly code)." ,
227227 unsafe_since : None ,
228228 } ;
229- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [
229+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowList ( & [
230230 Allow ( Target :: Fn ) ,
231231 Allow ( Target :: Method ( MethodKind :: Inherent ) ) ,
232232 Allow ( Target :: Method ( MethodKind :: Trait { body : true } ) ) ,
@@ -334,7 +334,7 @@ pub(crate) struct TrackCallerParser;
334334impl NoArgsAttributeParser for TrackCallerParser {
335335 const PATH : & [ Symbol ] = & [ sym:: track_caller] ;
336336 const ON_DUPLICATE : OnDuplicate = OnDuplicate :: Warn ;
337- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [
337+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowList ( & [
338338 Allow ( Target :: Fn ) ,
339339 Allow ( Target :: Method ( MethodKind :: Inherent ) ) ,
340340 Allow ( Target :: Method ( MethodKind :: Trait { body : true } ) ) ,
@@ -359,7 +359,7 @@ impl NoArgsAttributeParser for NoMangleParser {
359359 note : "the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them" ,
360360 unsafe_since : Some ( Edition2024 ) ,
361361 } ;
362- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowListWarnRest ( & [
362+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowListWarnRest ( & [
363363 Allow ( Target :: Fn ) ,
364364 Allow ( Target :: Static ) ,
365365 Allow ( Target :: Method ( MethodKind :: Inherent ) ) ,
@@ -462,7 +462,7 @@ impl AttributeParser for UsedParser {
462462 }
463463 } ,
464464 ) ] ;
465- const ALLOWED_TARGETS : AllowedTargets =
465+ const ALLOWED_TARGETS : AllowedTargets < ' _ > =
466466 AllowedTargets :: AllowList ( & [ Allow ( Target :: Static ) , Warn ( Target :: MacroCall ) ] ) ;
467467
468468 fn finalize ( self , _cx : & FinalizeContext < ' _ , ' _ > ) -> Option < AttributeKind > {
@@ -533,7 +533,7 @@ impl CombineAttributeParser for TargetFeatureParser {
533533 parse_tf_attribute ( cx, args)
534534 }
535535
536- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [
536+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowList ( & [
537537 Allow ( Target :: Fn ) ,
538538 Allow ( Target :: Method ( MethodKind :: Inherent ) ) ,
539539 Allow ( Target :: Method ( MethodKind :: Trait { body : true } ) ) ,
@@ -561,7 +561,7 @@ impl CombineAttributeParser for ForceTargetFeatureParser {
561561 was_forced : true ,
562562 } ;
563563 const TEMPLATE : AttributeTemplate = template ! ( List : & [ "enable = \" feat1, feat2\" " ] ) ;
564- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [
564+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowList ( & [
565565 Allow ( Target :: Fn ) ,
566566 Allow ( Target :: Method ( MethodKind :: Inherent ) ) ,
567567 Allow ( Target :: Method ( MethodKind :: Trait { body : true } ) ) ,
@@ -581,7 +581,7 @@ pub(crate) struct InstrumentFnParser;
581581
582582impl SingleAttributeParser for InstrumentFnParser {
583583 const PATH : & [ Symbol ] = & [ sym:: instrument_fn] ;
584- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [
584+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowList ( & [
585585 Allow ( Target :: Fn ) ,
586586 Allow ( Target :: Method ( MethodKind :: Inherent ) ) ,
587587 Allow ( Target :: Method ( MethodKind :: Trait { body : true } ) ) ,
@@ -619,7 +619,7 @@ pub(crate) struct SanitizeParser;
619619
620620impl SingleAttributeParser for SanitizeParser {
621621 const PATH : & [ Symbol ] = & [ sym:: sanitize] ;
622- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [
622+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowList ( & [
623623 Allow ( Target :: Fn ) ,
624624 Allow ( Target :: Closure ) ,
625625 Allow ( Target :: Method ( MethodKind :: Inherent ) ) ,
@@ -751,7 +751,7 @@ pub(crate) struct ThreadLocalParser;
751751
752752impl NoArgsAttributeParser for ThreadLocalParser {
753753 const PATH : & [ Symbol ] = & [ sym:: thread_local] ;
754- const ALLOWED_TARGETS : AllowedTargets =
754+ const ALLOWED_TARGETS : AllowedTargets < ' _ > =
755755 AllowedTargets :: AllowList ( & [ Allow ( Target :: Static ) , Allow ( Target :: ForeignStatic ) ] ) ;
756756 const STABILITY : AttributeStability = unstable ! ( thread_local) ;
757757 const CREATE : fn ( Span ) -> AttributeKind = |_| AttributeKind :: ThreadLocal ;
@@ -761,7 +761,7 @@ pub(crate) struct RustcPassIndirectlyInNonRusticAbisParser;
761761
762762impl NoArgsAttributeParser for RustcPassIndirectlyInNonRusticAbisParser {
763763 const PATH : & [ Symbol ] = & [ sym:: rustc_pass_indirectly_in_non_rustic_abis] ;
764- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [ Allow ( Target :: Struct ) ] ) ;
764+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowList ( & [ Allow ( Target :: Struct ) ] ) ;
765765 const STABILITY : AttributeStability = unstable ! ( rustc_attrs) ;
766766 const CREATE : fn ( Span ) -> AttributeKind = AttributeKind :: RustcPassIndirectlyInNonRusticAbis ;
767767}
@@ -770,7 +770,7 @@ pub(crate) struct RustcEiiForeignItemParser;
770770
771771impl NoArgsAttributeParser for RustcEiiForeignItemParser {
772772 const PATH : & [ Symbol ] = & [ sym:: rustc_eii_foreign_item] ;
773- const ALLOWED_TARGETS : AllowedTargets =
773+ const ALLOWED_TARGETS : AllowedTargets < ' _ > =
774774 AllowedTargets :: AllowList ( & [ Allow ( Target :: ForeignFn ) , Allow ( Target :: ForeignStatic ) ] ) ;
775775 const STABILITY : AttributeStability = unstable ! ( eii_internals) ;
776776 const CREATE : fn ( Span ) -> AttributeKind = |_| AttributeKind :: RustcEiiForeignItem ;
@@ -780,7 +780,7 @@ pub(crate) struct PatchableFunctionEntryParser;
780780
781781impl SingleAttributeParser for PatchableFunctionEntryParser {
782782 const PATH : & [ Symbol ] = & [ sym:: patchable_function_entry] ;
783- const ALLOWED_TARGETS : AllowedTargets = AllowedTargets :: AllowList ( & [ Allow ( Target :: Fn ) ] ) ;
783+ const ALLOWED_TARGETS : AllowedTargets < ' _ > = AllowedTargets :: AllowList ( & [ Allow ( Target :: Fn ) ] ) ;
784784 const TEMPLATE : AttributeTemplate = template ! ( List : & [ "prefix_nops = m, entry_nops = n" ] ) ;
785785 const STABILITY : AttributeStability = unstable ! ( patchable_function_entry) ;
786786
0 commit comments