rustc_feature/accepted.rs
1//! List of the accepted feature gates.
2
3use rustc_span::sym;
4
5use super::{Feature, to_nonzero};
6
7macro_rules! declare_features {
8 ($(
9 $(#[doc = $doc:tt])* (accepted, $feature:ident, $ver:expr, $issue:expr),
10 )+) => {
11 /// Formerly unstable features that have now been accepted (stabilized).
12 pub static ACCEPTED_LANG_FEATURES: &[Feature] = &[
13 $(Feature {
14 name: sym::$feature,
15 since: $ver,
16 issue: to_nonzero($issue),
17 }),+
18 ];
19 }
20}
21
22#[rustfmt::skip]
23declare_features! (
24 // -------------------------------------------------------------------------
25 // feature-group-start: for testing purposes
26 // -------------------------------------------------------------------------
27
28 /// A temporary feature gate used to enable parser extensions needed
29 /// to bootstrap fix for #5723.
30 (accepted, issue_5723_bootstrap, "1.0.0", None),
31 /// These are used to test this portion of the compiler,
32 /// they don't actually mean anything.
33 (accepted, test_accepted_feature, "1.0.0", None),
34 // !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
35 // Features are listed in alphabetical order. Tidy will fail if you don't keep it this way.
36 // !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
37
38 // -------------------------------------------------------------------------
39 // feature-group-end: for testing purposes
40 // -------------------------------------------------------------------------
41
42 // -------------------------------------------------------------------------
43 // feature-group-start: accepted features
44 // -------------------------------------------------------------------------
45
46 // Note that the version indicates when it got *stabilized*.
47 // When moving an unstable feature here, set the version number to
48 // `CURRENT RUSTC VERSION` with ` ` replaced by `_`.
49
50 /// Allows `#[target_feature(...)]` on aarch64 platforms
51 (accepted, aarch64_target_feature, "1.61.0", Some(44839)),
52 /// Allows using the `efiapi` ABI.
53 (accepted, abi_efiapi, "1.68.0", Some(65815)),
54 /// Allows the sysV64 ABI to be specified on all platforms
55 /// instead of just the platforms on which it is the C ABI.
56 (accepted, abi_sysv64, "1.24.0", Some(36167)),
57 /// Allows using the `thiscall` ABI.
58 (accepted, abi_thiscall, "1.73.0", None),
59 /// Allows using ADX intrinsics from `core::arch::{x86, x86_64}`.
60 (accepted, adx_target_feature, "1.61.0", Some(44839)),
61 /// Allows explicit discriminants on non-unit enum variants.
62 (accepted, arbitrary_enum_discriminant, "1.66.0", Some(60553)),
63 /// Allows #[cfg(...)] on inline assembly templates and operands.
64 (accepted, asm_cfg, "CURRENT_RUSTC_VERSION", Some(140364)),
65 /// Allows using `const` operands in inline assembly.
66 (accepted, asm_const, "1.82.0", Some(93332)),
67 /// Allows using `label` operands in inline assembly.
68 (accepted, asm_goto, "1.87.0", Some(119364)),
69 /// Allows using `sym` operands in inline assembly.
70 (accepted, asm_sym, "1.66.0", Some(93333)),
71 /// Allows the definition of associated constants in `trait` or `impl` blocks.
72 (accepted, associated_consts, "1.20.0", Some(29646)),
73 /// Allows the user of associated type bounds.
74 (accepted, associated_type_bounds, "1.79.0", Some(52662)),
75 /// Allows using associated `type`s in `trait`s.
76 (accepted, associated_types, "1.0.0", None),
77 /// Allows free and inherent `async fn`s, `async` blocks, and `<expr>.await` expressions.
78 (accepted, async_await, "1.39.0", Some(50547)),
79 /// Allows `async || body` closures.
80 (accepted, async_closure, "1.85.0", Some(62290)),
81 /// Allows async functions to be declared, implemented, and used in traits.
82 (accepted, async_fn_in_trait, "1.75.0", Some(91611)),
83 /// Allows all literals in attribute lists and values of key-value pairs.
84 (accepted, attr_literals, "1.30.0", Some(34981)),
85 /// Allows overloading augmented assignment operations like `a += b`.
86 (accepted, augmented_assignments, "1.8.0", Some(28235)),
87 /// Allows using `avx512*` target features.
88 (accepted, avx512_target_feature, "1.89.0", Some(44839)),
89 /// Allows mixing bind-by-move in patterns and references to those identifiers in guards.
90 (accepted, bind_by_move_pattern_guards, "1.39.0", Some(15287)),
91 /// Allows bindings in the subpattern of a binding pattern.
92 /// For example, you can write `x @ Some(y)`.
93 (accepted, bindings_after_at, "1.56.0", Some(65490)),
94 /// Allows empty structs and enum variants with braces.
95 (accepted, braced_empty_structs, "1.8.0", Some(29720)),
96 /// Allows `c"foo"` literals.
97 (accepted, c_str_literals, "1.77.0", Some(105723)),
98 /// Allows `extern "C-unwind" fn` to enable unwinding across ABI boundaries and treat `extern "C" fn` as nounwind.
99 (accepted, c_unwind, "1.81.0", Some(74990)),
100 /// Allows `#[cfg_attr(predicate, multiple, attributes, here)]`.
101 (accepted, cfg_attr_multi, "1.33.0", Some(54881)),
102 /// Allows the use of `#[cfg(<true/false>)]`.
103 (accepted, cfg_boolean_literals, "1.88.0", Some(131204)),
104 /// Allows the use of `#[cfg(doctest)]`, set when rustdoc is collecting doctests.
105 (accepted, cfg_doctest, "1.40.0", Some(62210)),
106 /// Enables `#[cfg(panic = "...")]` config key.
107 (accepted, cfg_panic, "1.60.0", Some(77443)),
108 /// Allows `cfg(target_abi = "...")`.
109 (accepted, cfg_target_abi, "1.78.0", Some(80970)),
110 /// Allows `cfg(target_feature = "...")`.
111 (accepted, cfg_target_feature, "1.27.0", Some(29717)),
112 /// Allows `cfg(target_vendor = "...")`.
113 (accepted, cfg_target_vendor, "1.33.0", Some(29718)),
114 /// Allows implementing `Clone` for closures where possible (RFC 2132).
115 (accepted, clone_closures, "1.26.0", Some(44490)),
116 /// Allows coercing non capturing closures to function pointers.
117 (accepted, closure_to_fn_coercion, "1.19.0", Some(39817)),
118 /// Allows using the CMPXCHG16B target feature.
119 (accepted, cmpxchg16b_target_feature, "1.69.0", Some(44839)),
120 /// Allows use of the `#[collapse_debuginfo]` attribute.
121 (accepted, collapse_debuginfo, "1.79.0", Some(100758)),
122 /// Allows usage of the `compile_error!` macro.
123 (accepted, compile_error, "1.20.0", Some(40872)),
124 /// Allows `impl Trait` in function return types.
125 (accepted, conservative_impl_trait, "1.26.0", Some(34511)),
126 /// Allows calling constructor functions in `const fn`.
127 (accepted, const_constructor, "1.40.0", Some(61456)),
128 /// Allows the definition of `const extern fn` and `const unsafe extern fn`.
129 (accepted, const_extern_fn, "1.83.0", Some(64926)),
130 /// Allows basic arithmetic on floating point types in a `const fn`.
131 (accepted, const_fn_floating_point_arithmetic, "1.82.0", Some(57241)),
132 /// Allows using and casting function pointers in a `const fn`.
133 (accepted, const_fn_fn_ptr_basics, "1.61.0", Some(57563)),
134 /// Allows trait bounds in `const fn`.
135 (accepted, const_fn_trait_bound, "1.61.0", Some(93706)),
136 /// Allows calling `transmute` in const fn
137 (accepted, const_fn_transmute, "1.56.0", Some(53605)),
138 /// Allows accessing fields of unions inside `const` functions.
139 (accepted, const_fn_union, "1.56.0", Some(51909)),
140 /// Allows unsizing coercions in `const fn`.
141 (accepted, const_fn_unsize, "1.54.0", Some(64992)),
142 /// Allows const generics to have default values (e.g. `struct Foo<const N: usize = 3>(...);`).
143 (accepted, const_generics_defaults, "1.59.0", Some(44580)),
144 /// Allows the use of `if` and `match` in constants.
145 (accepted, const_if_match, "1.46.0", Some(49146)),
146 /// Allows argument and return position `impl Trait` in a `const fn`.
147 (accepted, const_impl_trait, "1.61.0", Some(77463)),
148 /// Allows indexing into constant arrays.
149 (accepted, const_indexing, "1.26.0", Some(29947)),
150 /// Allows let bindings, assignments and destructuring in `const` functions and constants.
151 /// As long as control flow is not implemented in const eval, `&&` and `||` may not be used
152 /// at the same time as let bindings.
153 (accepted, const_let, "1.33.0", Some(48821)),
154 /// Allows the use of `loop` and `while` in constants.
155 (accepted, const_loop, "1.46.0", Some(52000)),
156 /// Allows using `&mut` in constant functions.
157 (accepted, const_mut_refs, "1.83.0", Some(57349)),
158 /// Allows panicking during const eval (producing compile-time errors).
159 (accepted, const_panic, "1.57.0", Some(51999)),
160 /// Allows dereferencing raw pointers during const eval.
161 (accepted, const_raw_ptr_deref, "1.58.0", Some(51911)),
162 /// Allows references to types with interior mutability within constants
163 (accepted, const_refs_to_cell, "1.83.0", Some(80384)),
164 /// Allows creating pointers and references to `static` items in constants.
165 (accepted, const_refs_to_static, "1.83.0", Some(119618)),
166 /// Allows implementing `Copy` for closures where possible (RFC 2132).
167 (accepted, copy_closures, "1.26.0", Some(44490)),
168 /// Allows `crate` in paths.
169 (accepted, crate_in_paths, "1.30.0", Some(45477)),
170 /// Allows users to provide classes for fenced code block using `class:classname`.
171 (accepted, custom_code_classes_in_docs, "1.80.0", Some(79483)),
172 /// Allows using `#[debugger_visualizer]` attribute.
173 (accepted, debugger_visualizer, "1.71.0", Some(95939)),
174 /// Allows rustc to inject a default alloc_error_handler
175 (accepted, default_alloc_error_handler, "1.68.0", Some(66741)),
176 /// Allows using assigning a default type to type parameters in algebraic data type definitions.
177 (accepted, default_type_params, "1.0.0", None),
178 /// Allows `#[deprecated]` attribute.
179 (accepted, deprecated, "1.9.0", Some(29935)),
180 /// Allows `#[derive(Default)]` and `#[default]` on enums.
181 (accepted, derive_default_enum, "1.62.0", Some(86985)),
182 /// Allows the use of destructuring assignments.
183 (accepted, destructuring_assignment, "1.59.0", Some(71126)),
184 /// Allows using the `#[diagnostic]` attribute tool namespace
185 (accepted, diagnostic_namespace, "1.78.0", Some(111996)),
186 /// Controls errors in trait implementations.
187 (accepted, do_not_recommend, "1.85.0", Some(51992)),
188 /// Allows `#[doc(alias = "...")]`.
189 (accepted, doc_alias, "1.48.0", Some(50146)),
190 /// Allows `..` in tuple (struct) patterns.
191 (accepted, dotdot_in_tuple_patterns, "1.14.0", Some(33627)),
192 /// Allows `..=` in patterns (RFC 1192).
193 (accepted, dotdoteq_in_patterns, "1.26.0", Some(28237)),
194 /// Allows `Drop` types in constants (RFC 1440).
195 (accepted, drop_types_in_const, "1.22.0", Some(33156)),
196 /// Allows using `dyn Trait` as a syntax for trait objects.
197 (accepted, dyn_trait, "1.27.0", Some(44662)),
198 /// Allows `X..Y` patterns.
199 (accepted, exclusive_range_pattern, "1.80.0", Some(37854)),
200 /// Allows integer match exhaustiveness checking (RFC 2591).
201 (accepted, exhaustive_integer_patterns, "1.33.0", Some(50907)),
202 /// Allows explicit generic arguments specification with `impl Trait` present.
203 (accepted, explicit_generic_args_with_impl_trait, "1.63.0", Some(83701)),
204 /// Uses 2024 rules for matching `expr` fragments in macros. Also enables `expr_2021` fragment.
205 (accepted, expr_fragment_specifier_2024, "1.83.0", Some(123742)),
206 /// Allows arbitrary expressions in key-value attributes at parse time.
207 (accepted, extended_key_value_attributes, "1.54.0", Some(78835)),
208 /// Allows using `aapcs`, `efiapi`, `sysv64` and `win64` as calling conventions
209 /// for functions with varargs.
210 (accepted, extended_varargs_abi_support, "1.91.0", Some(100189)),
211 /// Allows resolving absolute paths as paths from other crates.
212 (accepted, extern_absolute_paths, "1.30.0", Some(44660)),
213 /// Allows `extern crate foo as bar;`. This puts `bar` into extern prelude.
214 (accepted, extern_crate_item_prelude, "1.31.0", Some(55599)),
215 /// Allows `extern crate self as foo;`.
216 /// This puts local crate root into extern prelude under name `foo`.
217 (accepted, extern_crate_self, "1.34.0", Some(56409)),
218 /// Allows access to crate names passed via `--extern` through prelude.
219 (accepted, extern_prelude, "1.30.0", Some(44660)),
220 /// Allows using `system` as a calling convention with varargs.
221 (accepted, extern_system_varargs, "CURRENT_RUSTC_VERSION", Some(136946)),
222 /// Allows using F16C intrinsics from `core::arch::{x86, x86_64}`.
223 (accepted, f16c_target_feature, "1.68.0", Some(44839)),
224 /// Allows field shorthands (`x` meaning `x: x`) in struct literal expressions.
225 (accepted, field_init_shorthand, "1.17.0", Some(37340)),
226 /// Allows `#[must_use]` on functions, and introduces must-use operators (RFC 1940).
227 (accepted, fn_must_use, "1.27.0", Some(43302)),
228 /// Allows capturing variables in scope using format_args!
229 (accepted, format_args_capture, "1.58.0", Some(67984)),
230 /// Infer generic args for both consts and types.
231 (accepted, generic_arg_infer, "1.89.0", Some(85077)),
232 /// Allows associated types to be generic, e.g., `type Foo<T>;` (RFC 1598).
233 (accepted, generic_associated_types, "1.65.0", Some(44265)),
234 /// Allows attributes on lifetime/type formal parameters in generics (RFC 1327).
235 (accepted, generic_param_attrs, "1.27.0", Some(48848)),
236 /// Allows the `#[global_allocator]` attribute.
237 (accepted, global_allocator, "1.28.0", Some(27389)),
238 // FIXME: explain `globs`.
239 (accepted, globs, "1.0.0", None),
240 /// Allows using `..=X` as a pattern.
241 (accepted, half_open_range_patterns, "1.66.0", Some(67264)),
242 /// Allows using the `u128` and `i128` types.
243 (accepted, i128_type, "1.26.0", Some(35118)),
244 /// Allows the use of `if let` expressions.
245 (accepted, if_let, "1.0.0", None),
246 /// Rescoping temporaries in `if let` to align with Rust 2024.
247 (accepted, if_let_rescope, "1.84.0", Some(124085)),
248 /// Allows top level or-patterns (`p | q`) in `if let` and `while let`.
249 (accepted, if_while_or_patterns, "1.33.0", Some(48215)),
250 /// Allows lifetime elision in `impl` headers. For example:
251 /// + `impl<I:Iterator> Iterator for &mut Iterator`
252 /// + `impl Debug for Foo<'_>`
253 (accepted, impl_header_lifetime_elision, "1.31.0", Some(15872)),
254 /// Allows referencing `Self` and projections in impl-trait.
255 (accepted, impl_trait_projections, "1.74.0", Some(103532)),
256 /// Allows using imported `main` function
257 (accepted, imported_main, "1.79.0", Some(28937)),
258 /// Allows using `a..=b` and `..=b` as inclusive range syntaxes.
259 (accepted, inclusive_range_syntax, "1.26.0", Some(28237)),
260 /// Allows inferring outlives requirements (RFC 2093).
261 (accepted, infer_outlives_requirements, "1.30.0", Some(44493)),
262 /// Allow anonymous constants from an inline `const` block
263 (accepted, inline_const, "1.79.0", Some(76001)),
264 /// Allows irrefutable patterns in `if let` and `while let` statements (RFC 2086).
265 (accepted, irrefutable_let_patterns, "1.33.0", Some(44495)),
266 /// Allows `#[instruction_set(_)]` attribute.
267 (accepted, isa_attribute, "1.67.0", Some(74727)),
268 /// Allows some increased flexibility in the name resolution rules,
269 /// especially around globs and shadowing (RFC 1560).
270 (accepted, item_like_imports, "1.15.0", Some(35120)),
271 // Allows using the `kl` and `widekl` target features and the associated intrinsics
272 (accepted, keylocker_x86, "1.89.0", Some(134813)),
273 /// Allows `'a: { break 'a; }`.
274 (accepted, label_break_value, "1.65.0", Some(48594)),
275 /// Allows `if/while p && let q = r && ...` chains.
276 (accepted, let_chains, "1.88.0", Some(53667)),
277 /// Allows `let...else` statements.
278 (accepted, let_else, "1.65.0", Some(87335)),
279 /// Allows using `reason` in lint attributes and the `#[expect(lint)]` lint check.
280 (accepted, lint_reasons, "1.81.0", Some(54503)),
281 /// Allows `break {expr}` with a value inside `loop`s.
282 (accepted, loop_break_value, "1.19.0", Some(37339)),
283 /// Allows use of `?` as the Kleene "at most one" operator in macros.
284 (accepted, macro_at_most_once_rep, "1.32.0", Some(48075)),
285 /// Allows macro attributes to observe output of `#[derive]`.
286 (accepted, macro_attributes_in_derive_output, "1.57.0", Some(81119)),
287 /// Allows use of the `:lifetime` macro fragment specifier.
288 (accepted, macro_lifetime_matcher, "1.27.0", Some(34303)),
289 /// Allows use of the `:literal` macro fragment specifier (RFC 1576).
290 (accepted, macro_literal_matcher, "1.32.0", Some(35625)),
291 /// Allows `macro_rules!` items.
292 (accepted, macro_rules, "1.0.0", None),
293 /// Allows use of the `:vis` macro fragment specifier
294 (accepted, macro_vis_matcher, "1.30.0", Some(41022)),
295 /// Allows macro invocations in `extern {}` blocks.
296 (accepted, macros_in_extern, "1.40.0", Some(49476)),
297 /// Allows '|' at beginning of match arms (RFC 1925).
298 (accepted, match_beginning_vert, "1.25.0", Some(44101)),
299 /// Allows default match binding modes (RFC 2005).
300 (accepted, match_default_bindings, "1.26.0", Some(42640)),
301 /// Allows `impl Trait` with multiple unrelated lifetimes.
302 (accepted, member_constraints, "1.54.0", Some(61997)),
303 /// Allows the definition of `const fn` functions.
304 (accepted, min_const_fn, "1.31.0", Some(53555)),
305 /// The smallest useful subset of const generics.
306 (accepted, min_const_generics, "1.51.0", Some(74878)),
307 /// Allows calling `const unsafe fn` inside `unsafe` blocks in `const fn` functions.
308 (accepted, min_const_unsafe_fn, "1.33.0", Some(55607)),
309 /// Allows exhaustive pattern matching on uninhabited types when matched by value.
310 (accepted, min_exhaustive_patterns, "1.82.0", Some(119612)),
311 /// Allows using `Self` and associated types in struct expressions and patterns.
312 (accepted, more_struct_aliases, "1.16.0", Some(37544)),
313 /// Allows using the MOVBE target feature.
314 (accepted, movbe_target_feature, "1.70.0", Some(44839)),
315 /// Allows patterns with concurrent by-move and by-ref bindings.
316 /// For example, you can write `Foo(a, ref b)` where `a` is by-move and `b` is by-ref.
317 (accepted, move_ref_pattern, "1.49.0", Some(68354)),
318 /// Allows using `#[naked]` on functions.
319 (accepted, naked_functions, "1.88.0", Some(90957)),
320 /// Allows specifying modifiers in the link attribute: `#[link(modifiers = "...")]`
321 (accepted, native_link_modifiers, "1.61.0", Some(81490)),
322 /// Allows specifying the bundle link modifier
323 (accepted, native_link_modifiers_bundle, "1.63.0", Some(81490)),
324 /// Allows specifying the verbatim link modifier
325 (accepted, native_link_modifiers_verbatim, "1.67.0", Some(81490)),
326 /// Allows specifying the whole-archive link modifier
327 (accepted, native_link_modifiers_whole_archive, "1.61.0", Some(81490)),
328 /// Allows using non lexical lifetimes (RFC 2094).
329 (accepted, nll, "1.63.0", Some(43234)),
330 /// Allows using `#![no_std]`.
331 (accepted, no_std, "1.6.0", None),
332 /// Allows defining identifiers beyond ASCII.
333 (accepted, non_ascii_idents, "1.53.0", Some(55467)),
334 /// Allows future-proofing enums/structs with the `#[non_exhaustive]` attribute (RFC 2008).
335 (accepted, non_exhaustive, "1.40.0", Some(44109)),
336 /// Allows `foo.rs` as an alternative to `foo/mod.rs`.
337 (accepted, non_modrs_mods, "1.30.0", Some(44660)),
338 /// Allows using multiple nested field accesses in offset_of!
339 (accepted, offset_of_nested, "1.82.0", Some(120140)),
340 /// Allows the use of or-patterns (e.g., `0 | 1`).
341 (accepted, or_patterns, "1.53.0", Some(54883)),
342 /// Allows using `+bundle,+whole-archive` link modifiers with native libs.
343 (accepted, packed_bundled_libs, "1.74.0", Some(108081)),
344 /// Allows annotating functions conforming to `fn(&PanicInfo) -> !` with `#[panic_handler]`.
345 /// This defines the behavior of panics.
346 (accepted, panic_handler, "1.30.0", Some(44489)),
347 /// Allows attributes in formal function parameters.
348 (accepted, param_attrs, "1.39.0", Some(60406)),
349 /// Allows parentheses in patterns.
350 (accepted, pattern_parentheses, "1.31.0", Some(51087)),
351 /// Allows `use<'a, 'b, A, B>` in `impl Trait + use<...>` for precise capture of generic args.
352 (accepted, precise_capturing, "1.82.0", Some(123432)),
353 /// Allows `use<..>` precise capturing on impl Trait in traits.
354 (accepted, precise_capturing_in_traits, "1.87.0", Some(130044)),
355 /// Allows procedural macros in `proc-macro` crates.
356 (accepted, proc_macro, "1.29.0", Some(38356)),
357 /// Allows multi-segment paths in attributes and derives.
358 (accepted, proc_macro_path_invoc, "1.30.0", Some(38356)),
359 /// Allows `pub(restricted)` visibilities (RFC 1422).
360 (accepted, pub_restricted, "1.18.0", Some(32409)),
361 /// Allows use of the postfix `?` operator in expressions.
362 (accepted, question_mark, "1.13.0", Some(31436)),
363 /// Allows the use of raw-dylibs (RFC 2627).
364 (accepted, raw_dylib, "1.71.0", Some(58713)),
365 /// Allows keywords to be escaped for use as identifiers.
366 (accepted, raw_identifiers, "1.30.0", Some(48589)),
367 /// Allows `&raw const $place_expr` and `&raw mut $place_expr` expressions.
368 (accepted, raw_ref_op, "1.82.0", Some(64490)),
369 /// Allows relaxing the coherence rules such that
370 /// `impl<T> ForeignTrait<LocalType> for ForeignType<T>` is permitted.
371 (accepted, re_rebalance_coherence, "1.41.0", Some(55437)),
372 /// Allows numeric fields in struct expressions and patterns.
373 (accepted, relaxed_adts, "1.19.0", Some(35626)),
374 /// Lessens the requirements for structs to implement `Unsize`.
375 (accepted, relaxed_struct_unsize, "1.58.0", Some(81793)),
376 /// Allows the `#[repr(i128)]` attribute for enums.
377 (accepted, repr128, "1.89.0", Some(56071)),
378 /// Allows `repr(align(16))` struct attribute (RFC 1358).
379 (accepted, repr_align, "1.25.0", Some(33626)),
380 /// Allows using `#[repr(align(X))]` on enums with equivalent semantics
381 /// to wrapping an enum in a wrapper struct with `#[repr(align(X))]`.
382 (accepted, repr_align_enum, "1.37.0", Some(57996)),
383 /// Allows `#[repr(packed(N))]` attribute on structs.
384 (accepted, repr_packed, "1.33.0", Some(33158)),
385 /// Allows `#[repr(transparent)]` attribute on newtype structs.
386 (accepted, repr_transparent, "1.28.0", Some(43036)),
387 /// Allows enums like Result<T, E> to be used across FFI, if T's niche value can
388 /// be used to describe E or vice-versa.
389 (accepted, result_ffi_guarantees, "1.84.0", Some(110503)),
390 /// Allows return-position `impl Trait` in traits.
391 (accepted, return_position_impl_trait_in_trait, "1.75.0", Some(91611)),
392 /// Allows code like `let x: &'static u32 = &42` to work (RFC 1414).
393 (accepted, rvalue_static_promotion, "1.21.0", Some(38865)),
394 /// Allows use of the `vector` and related s390x target features.
395 (accepted, s390x_target_feature_vector, "CURRENT_RUSTC_VERSION", Some(145649)),
396 /// Allows `Self` in type definitions (RFC 2300).
397 (accepted, self_in_typedefs, "1.32.0", Some(49303)),
398 /// Allows `Self` struct constructor (RFC 2302).
399 (accepted, self_struct_ctor, "1.32.0", Some(51994)),
400 /// Allows use of x86 SHA512, SM3 and SM4 target-features and intrinsics
401 (accepted, sha512_sm_x86, "1.89.0", Some(126624)),
402 /// Shorten the tail expression lifetime
403 (accepted, shorter_tail_lifetimes, "1.84.0", Some(123739)),
404 /// Allows using subslice patterns, `[a, .., b]` and `[a, xs @ .., b]`.
405 (accepted, slice_patterns, "1.42.0", Some(62254)),
406 /// Allows use of `&foo[a..b]` as a slicing syntax.
407 (accepted, slicing_syntax, "1.0.0", None),
408 /// Allows use of `sse4a` target feature.
409 (accepted, sse4a_target_feature, "1.91.0", Some(44839)),
410 /// Allows elision of `'static` lifetimes in `static`s and `const`s.
411 (accepted, static_in_const, "1.17.0", Some(35897)),
412 /// Allows the definition recursive static items.
413 (accepted, static_recursion, "1.17.0", Some(29719)),
414 /// Allows attributes on struct literal fields.
415 (accepted, struct_field_attributes, "1.20.0", Some(38814)),
416 /// Allows struct variants `Foo { baz: u8, .. }` in enums (RFC 418).
417 (accepted, struct_variant, "1.0.0", None),
418 /// Allows `#[target_feature(...)]`.
419 (accepted, target_feature, "1.27.0", None),
420 /// Allows the use of `#[target_feature]` on safe functions.
421 (accepted, target_feature_11, "1.86.0", Some(69098)),
422 /// Allows use of `tbm` target feature.
423 (accepted, tbm_target_feature, "1.91.0", Some(44839)),
424 /// Allows `fn main()` with return types which implements `Termination` (RFC 1937).
425 (accepted, termination_trait, "1.26.0", Some(43301)),
426 /// Allows `#[test]` functions where the return type implements `Termination` (RFC 1937).
427 (accepted, termination_trait_test, "1.27.0", Some(48854)),
428 /// Allows attributes scoped to tools.
429 (accepted, tool_attributes, "1.30.0", Some(44690)),
430 /// Allows scoped lints.
431 (accepted, tool_lints, "1.31.0", Some(44690)),
432 /// Allows `#[track_caller]` to be used which provides
433 /// accurate caller location reporting during panic (RFC 2091).
434 (accepted, track_caller, "1.46.0", Some(47809)),
435 /// Allows dyn upcasting trait objects via supertraits.
436 /// Dyn upcasting is casting, e.g., `dyn Foo -> dyn Bar` where `Foo: Bar`.
437 (accepted, trait_upcasting, "1.86.0", Some(65991)),
438 /// Allows #[repr(transparent)] on univariant enums (RFC 2645).
439 (accepted, transparent_enums, "1.42.0", Some(60405)),
440 /// Allows indexing tuples.
441 (accepted, tuple_indexing, "1.0.0", None),
442 /// Allows paths to enum variants on type aliases including `Self`.
443 (accepted, type_alias_enum_variants, "1.37.0", Some(49683)),
444 /// Allows macros to appear in the type position.
445 (accepted, type_macros, "1.13.0", Some(27245)),
446 /// Allows using type privacy lints (`private_interfaces`, `private_bounds`, `unnameable_types`).
447 (accepted, type_privacy_lints, "1.79.0", Some(48054)),
448 /// Allows `const _: TYPE = VALUE`.
449 (accepted, underscore_const_names, "1.37.0", Some(54912)),
450 /// Allows `use path as _;` and `extern crate c as _;`.
451 (accepted, underscore_imports, "1.33.0", Some(48216)),
452 /// Allows `'_` placeholder lifetimes.
453 (accepted, underscore_lifetimes, "1.26.0", Some(44524)),
454 /// Allows `use x::y;` to search `x` in the current scope.
455 (accepted, uniform_paths, "1.32.0", Some(53130)),
456 /// Allows `impl Trait` in function arguments.
457 (accepted, universal_impl_trait, "1.26.0", Some(34511)),
458 /// Allows arbitrary delimited token streams in non-macro attributes.
459 (accepted, unrestricted_attribute_tokens, "1.34.0", Some(55208)),
460 /// Allows unsafe attributes.
461 (accepted, unsafe_attributes, "1.82.0", Some(123757)),
462 /// The `unsafe_op_in_unsafe_fn` lint (allowed by default): no longer treat an unsafe function as an unsafe block.
463 (accepted, unsafe_block_in_unsafe_fn, "1.52.0", Some(71668)),
464 /// Allows unsafe on extern declarations and safety qualifiers over internal items.
465 (accepted, unsafe_extern_blocks, "1.82.0", Some(123743)),
466 /// Allows importing and reexporting macros with `use`,
467 /// enables macro modularization in general.
468 (accepted, use_extern_macros, "1.30.0", Some(35896)),
469 /// Allows nested groups in `use` items (RFC 2128).
470 (accepted, use_nested_groups, "1.25.0", Some(44494)),
471 /// Allows `#[used]` to preserve symbols (see llvm.compiler.used).
472 (accepted, used, "1.30.0", Some(40289)),
473 /// Allows the use of `while let` expressions.
474 (accepted, while_let, "1.0.0", None),
475 /// Allows `#![windows_subsystem]`.
476 (accepted, windows_subsystem, "1.18.0", Some(37499)),
477 // !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
478 // Features are listed in alphabetical order. Tidy will fail if you don't keep it this way.
479 // !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
480
481 // -------------------------------------------------------------------------
482 // feature-group-end: accepted features
483 // -------------------------------------------------------------------------
484);