11//! List of the removed feature gates.
22
3- use std:: num:: { NonZero , NonZeroU32 } ;
3+ use std:: num:: NonZero ;
44
55use rustc_span:: sym;
66
77use super :: { Feature , to_nonzero} ;
8+ use crate :: opt_nonzero_u32;
89
910pub struct RemovedFeature {
1011 pub feature : Feature ,
1112 pub reason : Option < & ' static str > ,
1213 pub pull : Option < NonZero < u32 > > ,
1314}
1415
15- macro_rules! opt_nonzero_u32 {
16- ( ) => {
17- None
18- } ;
19- ( $val: expr) => {
20- Some ( NonZeroU32 :: new( $val) . unwrap( ) )
21- } ;
22- }
23-
2416macro_rules! declare_features {
2517 ( $(
2618 $( #[ doc = $doc: tt] ) * ( removed, $feature: ident, $ver: expr, $issue: expr, $reason: expr $( , $pull: expr) ?) ,
@@ -54,7 +46,6 @@ declare_features! (
5446
5547 /// Allows using the `amdgpu-kernel` ABI.
5648 ( removed, abi_amdgpu_kernel, "1.77.0" , Some ( 51575 ) , None , 120495 ) ,
57- ( removed, abi_c_cmse_nonsecure_call, "1.90.0" , Some ( 81391 ) , Some ( "renamed to abi_cmse_nonsecure_call" ) , 142146 ) ,
5849 ( removed, advanced_slice_patterns, "1.42.0" , Some ( 62254 ) ,
5950 Some ( "merged into `#![feature(slice_patterns)]`" ) , 67712 ) ,
6051 ( removed, allocator, "1.0.0" , None , None ) ,
@@ -74,8 +65,6 @@ declare_features! (
7465 Some ( "cannot be allowed in const eval in any meaningful way" ) , 73398 ) ,
7566 /// Allows limiting the evaluation steps of const expressions
7667 ( removed, const_eval_limit, "1.72.0" , Some ( 67217 ) , Some ( "removed the limit entirely" ) , 103877 ) ,
77- /// Allows non-trivial generic constants which have to be manually propagated upwards.
78- ( removed, const_evaluatable_checked, "1.56.0" , Some ( 76560 ) , Some ( "renamed to `generic_const_exprs`" ) , 88369 ) ,
7968 /// Allows the definition of `const` functions with some advanced features.
8069 ( removed, const_fn, "1.54.0" , Some ( 57563 ) ,
8170 Some ( "split into finer-grained feature gates" ) , 85109 ) ,
@@ -116,11 +105,6 @@ declare_features! (
116105 /// Allows using `doc(primitive)` without a future-incompat warning.
117106 ( removed, doc_primitive, "1.58.0" , Some ( 88070 ) ,
118107 Some ( "merged into `#![feature(rustdoc_internals)]`" ) , 90420 ) ,
119- /// Allows `#[doc(spotlight)]`.
120- /// The attribute was renamed to `#[doc(notable_trait)]`
121- /// and the feature to `doc_notable_trait`.
122- ( removed, doc_spotlight, "1.53.0" , Some ( 45040 ) ,
123- Some ( "renamed to `doc_notable_trait`" ) , 80965 ) ,
124108 /// Allows using `#[unsafe_destructor_blind_to_params]` (RFC 1238).
125109 ( removed, dropck_parametricity, "1.38.0" , Some ( 28498 ) , None ) ,
126110 /// Allows making `dyn Trait` well-formed even if `Trait` is not dyn compatible[^1].
@@ -150,10 +134,6 @@ declare_features! (
150134 /// Allows using `#[ffi_returns_twice]` on foreign functions.
151135 ( removed, ffi_returns_twice, "1.78.0" , Some ( 58314 ) ,
152136 Some ( "being investigated by the ffi-unwind project group" ) , 120502 ) ,
153- /// Allows generators to be cloned.
154- ( removed, generator_clone, "1.75.0" , Some ( 95360 ) , Some ( "renamed to `coroutine_clone`" ) , 116958 ) ,
155- /// Allows defining generators.
156- ( removed, generators, "1.75.0" , Some ( 43122 ) , Some ( "renamed to `coroutines`" ) , 116958 ) ,
157137 /// An extension to the `generic_associated_types` feature, allowing incomplete features.
158138 ( removed, generic_associated_types_extended, "1.85.0" , Some ( 95451 ) ,
159139 Some (
@@ -199,34 +179,20 @@ declare_features! (
199179 ( removed, negate_unsigned, "1.0.0" , Some ( 29645 ) , None ) ,
200180 /// Allows diverging expressions to fall back to `!` rather than `()`.
201181 ( removed, never_type_fallback, "1.93.0" , Some ( 65992 ) , Some ( "removed in favor of unconditional fallback" ) , 148871 ) ,
202- /// Allows `#[no_coverage]` on functions.
203- /// The feature was renamed to `coverage_attribute` and the attribute to `#[coverage(on|off)]`
204- ( removed, no_coverage, "1.74.0" , Some ( 84605 ) , Some ( "renamed to `coverage_attribute`" ) , 114656 ) ,
205182 /// Allows `#[no_debug]`.
206183 ( removed, no_debug, "1.43.0" , Some ( 29721 ) , Some ( "removed due to lack of demand" ) , 69667 ) ,
207- // Allows the use of `no_sanitize` attribute.
208- /// The feature was renamed to `sanitize` and the attribute to `#[sanitize(xyz = "on|off")]`
209- ( removed, no_sanitize, "1.91.0" , Some ( 39699 ) , Some ( r#"renamed to sanitize(xyz = "on|off")"# ) , 142681 ) ,
210184 /// Note: this feature was previously recorded in a separate
211185 /// `STABLE_REMOVED` list because it, uniquely, was once stable but was
212186 /// then removed. But there was no utility storing it separately, so now
213187 /// it's in this list.
214188 ( removed, no_stack_check, "1.0.0" , None , None , 40110 ) ,
215- /// Allows making `dyn Trait` well-formed even if `Trait` is not dyn compatible (object safe).
216- /// Renamed to `dyn_compatible_for_dispatch`.
217- ( removed, object_safe_for_dispatch, "1.83.0" , Some ( 43561 ) ,
218- Some ( "renamed to `dyn_compatible_for_dispatch`" ) , 131511 ) ,
219189 /// Allows using `#[omit_gdb_pretty_printer_section]`.
220190 ( removed, omit_gdb_pretty_printer_section, "1.91.0" , None , None , 144738 ) ,
221191 /// Allows using `#[on_unimplemented(..)]` on traits.
222192 /// (Moved to `rustc_attrs`.)
223193 ( removed, on_unimplemented, "1.40.0" , None , None , 65794 ) ,
224194 /// A way to temporarily opt out of opt-in copy. This will *never* be accepted.
225195 ( removed, opt_out_copy, "1.0.0" , None , None , 20740 ) ,
226- /// Allows features specific to OIBIT (now called auto traits).
227- /// Renamed to `auto_traits`.
228- ( removed, optin_builtin_traits, "1.50.0" , Some ( 13231 ) ,
229- Some ( "renamed to `auto_traits`" ) , 79336 ) ,
230196 /// Allows overlapping impls of marker traits.
231197 ( removed, overlapping_marker_traits, "1.42.0" , Some ( 29864 ) ,
232198 Some ( "removed in favor of `#![feature(marker_trait_attr)]`" ) , 68544 ) ,
0 commit comments