22//!
33//! The actual definitions were copied from rustc's `compiler/rustc_feature/src/builtin_attrs.rs`.
44//!
5- //! It was last synchronized with upstream commit 2225ee1b62ff089917434aefd9b2bf509cfa087f .
5+ //! It was last synchronized with upstream commit 835150e70288535bc57bb624792229b9dc94991d .
66//!
77//! The macros were adjusted to only expand to the attribute name, since that is all we need to do
88//! name resolution, and `BUILTIN_ATTRIBUTES` is almost entirely unchanged from the original, to
@@ -58,7 +58,6 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
5858 ungated ! ( reexport_test_harness_main, Normal , template!( NameValueStr : "name" ) ) ,
5959
6060 // Macros:
61- ungated ! ( derive, Normal , template!( List : "Trait1, Trait2, ..." ) ) ,
6261 ungated ! ( automatically_derived, Normal , template!( Word ) ) ,
6362 // FIXME(#14407)
6463 ungated ! ( macro_use, Normal , template!( Word , List : "name1, name2, ..." ) ) ,
@@ -98,8 +97,8 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
9897 template!( List : r#"name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...""# ) ,
9998 ) ,
10099 ungated ! ( link_name, AssumedUsed , template!( NameValueStr : "name" ) ) ,
101- ungated ! ( no_link, Normal , template!( Word ) ) ,
102- ungated ! ( repr, Normal , template!( List : "C" ) ) ,
100+ ungated ! ( no_link, AssumedUsed , template!( Word ) ) ,
101+ ungated ! ( repr, AssumedUsed , template!( List : "C" ) ) ,
103102 ungated ! ( export_name, AssumedUsed , template!( NameValueStr : "name" ) ) ,
104103 ungated ! ( link_section, AssumedUsed , template!( NameValueStr : "name" ) ) ,
105104 ungated ! ( no_mangle, AssumedUsed , template!( Word ) ) ,
@@ -112,6 +111,10 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
112111 const_eval_limit, CrateLevel , template!( NameValueStr : "N" ) , const_eval_limit,
113112 experimental!( const_eval_limit)
114113 ) ,
114+ gated ! (
115+ move_size_limit, CrateLevel , template!( NameValueStr : "N" ) , large_assignments,
116+ experimental!( move_size_limit)
117+ ) ,
115118
116119 // Entry point:
117120 ungated ! ( main, Normal , template!( Word ) ) ,
@@ -140,6 +143,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
140143 template!( List : "address, memory, thread" ) ,
141144 experimental!( no_sanitize)
142145 ) ,
146+ gated ! ( no_coverage, AssumedUsed , template!( Word ) , experimental!( no_coverage) ) ,
143147
144148 // FIXME: #14408 assume docs are used since rustdoc looks at them.
145149 ungated ! ( doc, AssumedUsed , template!( List : "hidden|inline|..." , NameValueStr : "string" ) ) ,
@@ -150,11 +154,6 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
150154
151155 // Linking:
152156 gated ! ( naked, AssumedUsed , template!( Word ) , naked_functions, experimental!( naked) ) ,
153- gated ! (
154- link_args, Normal , template!( NameValueStr : "args" ) ,
155- "the `link_args` attribute is experimental and not portable across platforms, \
156- it is recommended to use `#[link(name = \" foo\" )] instead",
157- ) ,
158157 gated ! (
159158 link_ordinal, AssumedUsed , template!( List : "ordinal" ) , raw_dylib,
160159 experimental!( link_ordinal)
@@ -172,7 +171,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
172171 "custom test frameworks are an unstable feature" ,
173172 ) ,
174173 // RFC #1268
175- gated ! ( marker, Normal , template!( Word ) , marker_trait_attr, experimental!( marker) ) ,
174+ gated ! ( marker, AssumedUsed , template!( Word ) , marker_trait_attr, experimental!( marker) ) ,
176175 gated ! (
177176 thread_local, AssumedUsed , template!( Word ) ,
178177 "`#[thread_local]` is an experimental feature, and does not currently handle destructors" ,
@@ -291,7 +290,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
291290 // Internal attributes, Macro related:
292291 // ==========================================================================
293292
294- rustc_attr ! ( rustc_builtin_macro, AssumedUsed , template!( Word ) , IMPL_DETAIL ) ,
293+ rustc_attr ! ( rustc_builtin_macro, AssumedUsed , template!( Word , NameValueStr : "name" ) , IMPL_DETAIL ) ,
295294 rustc_attr ! ( rustc_proc_macro_decls, Normal , template!( Word ) , INTERNAL_UNSTABLE ) ,
296295 rustc_attr ! (
297296 rustc_macro_transparency, AssumedUsed ,
@@ -319,7 +318,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
319318 // ==========================================================================
320319
321320 rustc_attr ! ( rustc_promotable, AssumedUsed , template!( Word ) , IMPL_DETAIL ) ,
322- rustc_attr ! ( rustc_args_required_const , AssumedUsed , template!( List : "N" ) , INTERNAL_UNSTABLE ) ,
321+ rustc_attr ! ( rustc_legacy_const_generics , AssumedUsed , template!( List : "N" ) , INTERNAL_UNSTABLE ) ,
323322
324323 // ==========================================================================
325324 // Internal attributes, Layout related:
@@ -380,13 +379,23 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
380379 rustc_specialization_trait, Normal , template!( Word ) ,
381380 "the `#[rustc_specialization_trait]` attribute is used to check specializations"
382381 ) ,
382+ rustc_attr ! (
383+ rustc_main, Normal , template!( Word ) ,
384+ "the `#[rustc_main]` attribute is used internally to specify test entry point function" ,
385+ ) ,
386+ rustc_attr ! (
387+ rustc_skip_array_during_method_dispatch, Normal , template!( Word ) ,
388+ "the `#[rustc_skip_array_during_method_dispatch]` attribute is used to exclude a trait \
389+ from method dispatch when the receiver is an array, for compatibility in editions < 2021."
390+ ) ,
383391
384392 // ==========================================================================
385393 // Internal attributes, Testing:
386394 // ==========================================================================
387395
388396 rustc_attr ! ( TEST , rustc_outlives, Normal , template!( Word ) ) ,
389397 rustc_attr ! ( TEST , rustc_capture_analysis, Normal , template!( Word ) ) ,
398+ rustc_attr ! ( TEST , rustc_insignificant_dtor, Normal , template!( Word ) ) ,
390399 rustc_attr ! ( TEST , rustc_variance, Normal , template!( Word ) ) ,
391400 rustc_attr ! ( TEST , rustc_layout, Normal , template!( List : "field1, field2, ..." ) ) ,
392401 rustc_attr ! ( TEST , rustc_regions, Normal , template!( Word ) ) ,
@@ -395,12 +404,9 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
395404 template!( Word , List : "delay_span_bug_from_inside_query" )
396405 ) ,
397406 rustc_attr ! ( TEST , rustc_dump_user_substs, AssumedUsed , template!( Word ) ) ,
407+ rustc_attr ! ( TEST , rustc_evaluate_where_clauses, AssumedUsed , template!( Word ) ) ,
398408 rustc_attr ! ( TEST , rustc_if_this_changed, AssumedUsed , template!( Word , List : "DepNode" ) ) ,
399409 rustc_attr ! ( TEST , rustc_then_this_would_need, AssumedUsed , template!( List : "DepNode" ) ) ,
400- rustc_attr ! (
401- TEST , rustc_dirty, AssumedUsed ,
402- template!( List : r#"cfg = "...", /*opt*/ label = "...", /*opt*/ except = "...""# ) ,
403- ) ,
404410 rustc_attr ! (
405411 TEST , rustc_clean, AssumedUsed ,
406412 template!( List : r#"cfg = "...", /*opt*/ label = "...", /*opt*/ except = "...""# ) ,
0 commit comments