1 //! List of the removed feature gates.
3 use super::{to_nonzero, Feature}
;
4 use rustc_span
::symbol
::sym
;
6 pub struct RemovedFeature
{
8 pub reason
: Option
<&'
static str>,
11 macro_rules
! declare_features
{
13 $
(#[doc = $doc:tt])* (removed, $feature:ident, $ver:expr, $issue:expr, None, $reason:expr),
15 /// Formerly unstable features that have now been removed.
16 pub const REMOVED_FEATURES
: &[RemovedFeature
] = &[
21 issue
: to_nonzero($issue
),
32 // -------------------------------------------------------------------------
33 // feature-group-start: removed features
34 // -------------------------------------------------------------------------
36 (removed
, advanced_slice_patterns
, "1.0.0", Some(62254), None
,
37 Some("merged into `#![feature(slice_patterns)]`")),
38 (removed
, allocator
, "1.0.0", None
, None
, None
),
39 /// Allows a test to fail without failing the whole suite.
40 (removed
, allow_fail
, "1.19.0", Some(46488), None
, Some("removed due to no clear use cases")),
41 (removed
, await_macro
, "1.38.0", Some(50547), None
,
42 Some("subsumed by `.await` syntax")),
43 /// Allows using the `box $expr` syntax.
44 (removed
, box_syntax
, "1.70.0", Some(49733), None
, Some("replaced with `#[rustc_box]`")),
45 /// Allows capturing disjoint fields in a closure/coroutine (RFC 2229).
46 (removed
, capture_disjoint_fields
, "1.49.0", Some(53488), None
, Some("stabilized in Rust 2021")),
47 /// Allows comparing raw pointers during const eval.
48 (removed
, const_compare_raw_pointers
, "1.46.0", Some(53020), None
,
49 Some("cannot be allowed in const eval in any meaningful way")),
50 /// Allows limiting the evaluation steps of const expressions
51 (removed
, const_eval_limit
, "1.43.0", Some(67217), None
, Some("removed the limit entirely")),
52 /// Allows non-trivial generic constants which have to be manually propagated upwards.
53 (removed
, const_evaluatable_checked
, "1.48.0", Some(76560), None
, Some("renamed to `generic_const_exprs`")),
54 /// Allows the definition of `const` functions with some advanced features.
55 (removed
, const_fn
, "1.54.0", Some(57563), None
,
56 Some("split into finer-grained feature gates")),
57 /// Allows const generic types (e.g. `struct Foo<const N: usize>(...);`).
58 (removed
, const_generics
, "1.34.0", Some(44580), None
,
59 Some("removed in favor of `#![feature(adt_const_params)]` and `#![feature(generic_const_exprs)]`")),
60 /// Allows `[x; N]` where `x` is a constant (RFC 2203).
61 (removed
, const_in_array_repeat_expressions
, "1.37.0", Some(49147), None
,
62 Some("removed due to causing promotable bugs")),
63 /// Allows casting raw pointers to `usize` during const eval.
64 (removed
, const_raw_ptr_to_usize_cast
, "1.55.0", Some(51910), None
,
65 Some("at compile-time, pointers do not have an integer value, so these casts cannot be properly supported")),
66 /// Allows `T: ?const Trait` syntax in bounds.
67 (removed
, const_trait_bound_opt_out
, "1.42.0", Some(67794), None
,
68 Some("Removed in favor of `~const` bound in #![feature(const_trait_impl)]")),
69 /// Allows using `crate` as visibility modifier, synonymous with `pub(crate)`.
70 (removed
, crate_visibility_modifier
, "1.63.0", Some(53120), None
, Some("removed in favor of `pub(crate)`")),
71 /// Allows using custom attributes (RFC 572).
72 (removed
, custom_attribute
, "1.0.0", Some(29642), None
,
73 Some("removed in favor of `#![register_tool]` and `#![register_attr]`")),
74 /// Allows the use of `#[derive(Anything)]` as sugar for `#[derive_Anything]`.
75 (removed
, custom_derive
, "1.32.0", Some(29644), None
,
76 Some("subsumed by `#[proc_macro_derive]`")),
77 /// Allows using `#[doc(keyword = "...")]`.
78 (removed
, doc_keyword
, "1.28.0", Some(51315), None
,
79 Some("merged into `#![feature(rustdoc_internals)]`")),
80 /// Allows using `doc(primitive)` without a future-incompat warning.
81 (removed
, doc_primitive
, "1.56.0", Some(88070), None
,
82 Some("merged into `#![feature(rustdoc_internals)]`")),
83 /// Allows `#[doc(spotlight)]`.
84 /// The attribute was renamed to `#[doc(notable_trait)]`
85 /// and the feature to `doc_notable_trait`.
86 (removed
, doc_spotlight
, "1.22.0", Some(45040), None
,
87 Some("renamed to `doc_notable_trait`")),
88 /// Allows using `#[unsafe_destructor_blind_to_params]` (RFC 1238).
89 (removed
, dropck_parametricity
, "1.38.0", Some(28498), None
, None
),
90 /// Allows defining `existential type`s.
91 (removed
, existential_type
, "1.38.0", Some(63063), None
,
92 Some("removed in favor of `#![feature(type_alias_impl_trait)]`")),
93 /// Paths of the form: `extern::foo::bar`
94 (removed
, extern_in_paths
, "1.33.0", Some(55600), None
,
95 Some("subsumed by `::foo::bar` paths")),
96 /// Allows `#[doc(include = "some-file")]`.
97 (removed
, external_doc
, "1.54.0", Some(44732), None
,
98 Some("use #[doc = include_str!(\"filename\")] instead, which handles macro invocations")),
99 /// Allows generators to be cloned.
100 (removed
, generator_clone
, "1.65.0", Some(95360), None
, Some("renamed to `coroutine_clone`")),
101 /// Allows defining generators.
102 (removed
, generators
, "1.21.0", Some(43122), None
, Some("renamed to `coroutines`")),
103 /// Allows `impl Trait` in bindings (`let`, `const`, `static`).
104 (removed
, impl_trait_in_bindings
, "1.55.0", Some(63065), None
,
105 Some("the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done")),
106 (removed
, import_shadowing
, "1.0.0", None
, None
, None
),
107 /// Allows in-band quantification of lifetime bindings (e.g., `fn foo(x: &'a u8) -> &'a u8`).
108 (removed
, in_band_lifetimes
, "1.23.0", Some(44524), None
,
109 Some("removed due to unsolved ergonomic questions and added lifetime resolution complexity")),
110 /// Allows inferring `'static` outlives requirements (RFC 2093).
111 (removed
, infer_static_outlives_requirements
, "1.63.0", Some(54185), None
,
112 Some("removed as it caused some confusion and discussion was inactive for years")),
113 /// Lazily evaluate constants. This allows constants to depend on type parameters.
114 (removed
, lazy_normalization_consts
, "1.46.0", Some(72219), None
, Some("superseded by `generic_const_exprs`")),
115 /// Allows using the `#[link_args]` attribute.
116 (removed
, link_args
, "1.53.0", Some(29596), None
,
117 Some("removed in favor of using `-C link-arg=ARG` on command line, \
118 which is available from cargo build scripts with `cargo:rustc-link-arg` now")),
119 (removed
, macro_reexport
, "1.0.0", Some(29638), None
,
120 Some("subsumed by `pub use`")),
121 /// Allows using `#[main]` to replace the entrypoint `#[lang = "start"]` calls.
122 (removed
, main
, "1.53.0", Some(29634), None
, None
),
123 (removed
, managed_boxes
, "1.0.0", None
, None
, None
),
124 /// Allows the use of type alias impl trait in function return positions
125 (removed
, min_type_alias_impl_trait
, "1.56.0", Some(63063), None
,
126 Some("removed in favor of full type_alias_impl_trait")),
127 (removed
, needs_allocator
, "1.4.0", Some(27389), None
,
128 Some("subsumed by `#![feature(allocator_internals)]`")),
129 /// Allows use of unary negate on unsigned integers, e.g., -e for e: u8
130 (removed
, negate_unsigned
, "1.0.0", Some(29645), None
, None
),
131 /// Allows `#[no_coverage]` on functions.
132 /// The feature was renamed to `coverage_attribute` and the attribute to `#[coverage(on|off)]`
133 (removed
, no_coverage
, "1.74.0", Some(84605), None
, Some("renamed to `coverage_attribute`")),
134 /// Allows `#[no_debug]`.
135 (removed
, no_debug
, "1.43.0", Some(29721), None
, Some("removed due to lack of demand")),
136 /// Note: this feature was previously recorded in a separate
137 /// `STABLE_REMOVED` list because it, uniquely, was once stable but was
138 /// then removed. But there was no utility storing it separately, so now
139 /// it's in this list.
140 (removed
, no_stack_check
, "1.0.0", None
, None
, None
),
141 /// Allows using `#[on_unimplemented(..)]` on traits.
142 /// (Moved to `rustc_attrs`.)
143 (removed
, on_unimplemented
, "1.40.0", None
, None
, None
),
144 /// A way to temporarily opt out of opt-in copy. This will *never* be accepted.
145 (removed
, opt_out_copy
, "1.0.0", None
, None
, None
),
146 /// Allows features specific to OIBIT (now called auto traits).
147 /// Renamed to `auto_traits`.
148 (removed
, optin_builtin_traits
, "1.0.0", Some(13231), None
,
149 Some("renamed to `auto_traits`")),
150 /// Allows overlapping impls of marker traits.
151 (removed
, overlapping_marker_traits
, "1.42.0", Some(29864), None
,
152 Some("removed in favor of `#![feature(marker_trait_attr)]`")),
153 (removed
, panic_implementation
, "1.28.0", Some(44489), None
,
154 Some("subsumed by `#[panic_handler]`")),
155 /// Allows using `#![plugin(myplugin)]`.
156 (removed
, plugin
, "1.75.0", Some(29597), None
,
157 Some("plugins are no longer supported")),
158 /// Allows using `#[plugin_registrar]` on functions.
159 (removed
, plugin_registrar
, "1.54.0", Some(29597), None
,
160 Some("plugins are no longer supported")),
161 (removed
, proc_macro_expr
, "1.27.0", Some(54727), None
,
162 Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
163 (removed
, proc_macro_gen
, "1.27.0", Some(54727), None
,
164 Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
165 (removed
, proc_macro_mod
, "1.27.0", Some(54727), None
,
166 Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
167 (removed
, proc_macro_non_items
, "1.27.0", Some(54727), None
,
168 Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
169 (removed
, pub_macro_rules
, "1.53.0", Some(78855), None
,
170 Some("removed due to being incomplete, in particular it does not work across crates")),
171 (removed
, pushpop_unsafe
, "1.2.0", None
, None
, None
),
172 (removed
, quad_precision_float
, "1.0.0", None
, None
, None
),
173 (removed
, quote
, "1.33.0", Some(29601), None
, None
),
174 (removed
, reflect
, "1.0.0", Some(27749), None
, None
),
175 /// Allows using the `#[register_attr]` attribute.
176 (removed
, register_attr
, "1.65.0", Some(66080), None
,
177 Some("removed in favor of `#![register_tool]`")),
178 /// Allows using the macros:
179 /// + `__diagnostic_used`
180 /// + `__register_diagnostic`
181 /// +`__build_diagnostic_array`
182 (removed
, rustc_diagnostic_macros
, "1.38.0", None
, None
, None
),
183 /// Allows identifying crates that contain sanitizer runtimes.
184 (removed
, sanitizer_runtime
, "1.17.0", None
, None
, None
),
185 (removed
, simd
, "1.0.0", Some(27731), None
,
186 Some("removed in favor of `#[repr(simd)]`")),
187 /// Allows `#[link(kind = "static-nobundle", ...)]`.
188 (removed
, static_nobundle
, "1.16.0", Some(37403), None
,
189 Some(r
#"subsumed by `#[link(kind = "static", modifiers = "-bundle", ...)]`"#)),
190 (removed
, struct_inherit
, "1.0.0", None
, None
, None
),
191 (removed
, test_removed_feature
, "1.0.0", None
, None
, None
),
192 /// Allows using items which are missing stability attributes
193 (removed
, unmarked_api
, "1.0.0", None
, None
, None
),
194 (removed
, unsafe_no_drop_flag
, "1.0.0", None
, None
, None
),
195 /// Allows `union` fields that don't implement `Copy` as long as they don't have any drop glue.
196 (removed
, untagged_unions
, "1.13.0", Some(55149), None
,
197 Some("unions with `Copy` and `ManuallyDrop` fields are stable; there is no intent to stabilize more")),
198 /// Allows `#[unwind(..)]`.
200 /// Permits specifying whether a function should permit unwinding or abort on unwind.
201 (removed
, unwind_attributes
, "1.56.0", Some(58760), None
, Some("use the C-unwind ABI instead")),
202 (removed
, visible_private_types
, "1.0.0", None
, None
, None
),
203 // !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
204 // Features are listed in alphabetical order. Tidy will fail if you don't keep it this way.
205 // !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
207 // -------------------------------------------------------------------------
208 // feature-group-end: removed features
209 // -------------------------------------------------------------------------