2
2
//!
3
3
//! The actual definitions were copied from rustc's `compiler/rustc_feature/src/builtin_attrs.rs`.
4
4
//!
5
- //! It was last synchronized with upstream commit 2225ee1b62ff089917434aefd9b2bf509cfa087f .
5
+ //! It was last synchronized with upstream commit 835150e70288535bc57bb624792229b9dc94991d .
6
6
//!
7
7
//! The macros were adjusted to only expand to the attribute name, since that is all we need to do
8
8
//! name resolution, and `BUILTIN_ATTRIBUTES` is almost entirely unchanged from the original, to
@@ -58,7 +58,6 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
58
58
ungated ! ( reexport_test_harness_main, Normal , template!( NameValueStr : "name" ) ) ,
59
59
60
60
// Macros:
61
- ungated ! ( derive, Normal , template!( List : "Trait1, Trait2, ..." ) ) ,
62
61
ungated ! ( automatically_derived, Normal , template!( Word ) ) ,
63
62
// FIXME(#14407)
64
63
ungated ! ( macro_use, Normal , template!( Word , List : "name1, name2, ..." ) ) ,
@@ -98,8 +97,8 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
98
97
template!( List : r#"name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...""# ) ,
99
98
) ,
100
99
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" ) ) ,
103
102
ungated ! ( export_name, AssumedUsed , template!( NameValueStr : "name" ) ) ,
104
103
ungated ! ( link_section, AssumedUsed , template!( NameValueStr : "name" ) ) ,
105
104
ungated ! ( no_mangle, AssumedUsed , template!( Word ) ) ,
@@ -112,6 +111,10 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
112
111
const_eval_limit, CrateLevel , template!( NameValueStr : "N" ) , const_eval_limit,
113
112
experimental!( const_eval_limit)
114
113
) ,
114
+ gated ! (
115
+ move_size_limit, CrateLevel , template!( NameValueStr : "N" ) , large_assignments,
116
+ experimental!( move_size_limit)
117
+ ) ,
115
118
116
119
// Entry point:
117
120
ungated ! ( main, Normal , template!( Word ) ) ,
@@ -140,6 +143,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
140
143
template!( List : "address, memory, thread" ) ,
141
144
experimental!( no_sanitize)
142
145
) ,
146
+ gated ! ( no_coverage, AssumedUsed , template!( Word ) , experimental!( no_coverage) ) ,
143
147
144
148
// FIXME: #14408 assume docs are used since rustdoc looks at them.
145
149
ungated ! ( doc, AssumedUsed , template!( List : "hidden|inline|..." , NameValueStr : "string" ) ) ,
@@ -150,11 +154,6 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
150
154
151
155
// Linking:
152
156
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
- ) ,
158
157
gated ! (
159
158
link_ordinal, AssumedUsed , template!( List : "ordinal" ) , raw_dylib,
160
159
experimental!( link_ordinal)
@@ -172,7 +171,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
172
171
"custom test frameworks are an unstable feature" ,
173
172
) ,
174
173
// RFC #1268
175
- gated ! ( marker, Normal , template!( Word ) , marker_trait_attr, experimental!( marker) ) ,
174
+ gated ! ( marker, AssumedUsed , template!( Word ) , marker_trait_attr, experimental!( marker) ) ,
176
175
gated ! (
177
176
thread_local, AssumedUsed , template!( Word ) ,
178
177
"`#[thread_local]` is an experimental feature, and does not currently handle destructors" ,
@@ -291,7 +290,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
291
290
// Internal attributes, Macro related:
292
291
// ==========================================================================
293
292
294
- rustc_attr ! ( rustc_builtin_macro, AssumedUsed , template!( Word ) , IMPL_DETAIL ) ,
293
+ rustc_attr ! ( rustc_builtin_macro, AssumedUsed , template!( Word , NameValueStr : "name" ) , IMPL_DETAIL ) ,
295
294
rustc_attr ! ( rustc_proc_macro_decls, Normal , template!( Word ) , INTERNAL_UNSTABLE ) ,
296
295
rustc_attr ! (
297
296
rustc_macro_transparency, AssumedUsed ,
@@ -319,7 +318,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
319
318
// ==========================================================================
320
319
321
320
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 ) ,
323
322
324
323
// ==========================================================================
325
324
// Internal attributes, Layout related:
@@ -380,13 +379,23 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
380
379
rustc_specialization_trait, Normal , template!( Word ) ,
381
380
"the `#[rustc_specialization_trait]` attribute is used to check specializations"
382
381
) ,
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
+ ) ,
383
391
384
392
// ==========================================================================
385
393
// Internal attributes, Testing:
386
394
// ==========================================================================
387
395
388
396
rustc_attr ! ( TEST , rustc_outlives, Normal , template!( Word ) ) ,
389
397
rustc_attr ! ( TEST , rustc_capture_analysis, Normal , template!( Word ) ) ,
398
+ rustc_attr ! ( TEST , rustc_insignificant_dtor, Normal , template!( Word ) ) ,
390
399
rustc_attr ! ( TEST , rustc_variance, Normal , template!( Word ) ) ,
391
400
rustc_attr ! ( TEST , rustc_layout, Normal , template!( List : "field1, field2, ..." ) ) ,
392
401
rustc_attr ! ( TEST , rustc_regions, Normal , template!( Word ) ) ,
@@ -395,12 +404,9 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
395
404
template!( Word , List : "delay_span_bug_from_inside_query" )
396
405
) ,
397
406
rustc_attr ! ( TEST , rustc_dump_user_substs, AssumedUsed , template!( Word ) ) ,
407
+ rustc_attr ! ( TEST , rustc_evaluate_where_clauses, AssumedUsed , template!( Word ) ) ,
398
408
rustc_attr ! ( TEST , rustc_if_this_changed, AssumedUsed , template!( Word , List : "DepNode" ) ) ,
399
409
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
- ) ,
404
410
rustc_attr ! (
405
411
TEST , rustc_clean, AssumedUsed ,
406
412
template!( List : r#"cfg = "...", /*opt*/ label = "...", /*opt*/ except = "...""# ) ,
0 commit comments