1 //! List of the removed feature gates.
3 use super::{to_nonzero, Feature, State};
4 use rustc_span::symbol::sym;
6 macro_rules! declare_features {
8 $(#[doc = $doc:tt])* (removed, $feature:ident, $ver:expr, $issue:expr, None, $reason:expr),
10 /// Represents unstable features which have since been removed (it was once Active)
11 pub const REMOVED_FEATURES: &[Feature] = &[
14 state: State::Removed { reason: $reason },
17 issue: to_nonzero($issue),
19 description: concat!($($doc,)*),
26 $(#[doc = $doc:tt])* (stable_removed, $feature:ident, $ver:expr, $issue:expr, None),
28 /// Represents stable features which have since been removed (it was once Accepted)
29 pub const STABLE_REMOVED_FEATURES: &[Feature] = &[
32 state: State::Stabilized { reason: None },
35 issue: to_nonzero($issue),
37 description: concat!($($doc,)*),
46 // -------------------------------------------------------------------------
47 // feature-group-start: removed features
48 // -------------------------------------------------------------------------
50 (removed, import_shadowing, "1.0.0", None, None, None),
51 (removed, managed_boxes, "1.0.0", None, None, None),
52 /// Allows use of unary negate on unsigned integers, e.g., -e for e: u8
53 (removed, negate_unsigned, "1.0.0", Some(29645), None, None),
54 (removed, reflect, "1.0.0", Some(27749), None, None),
55 /// A way to temporarily opt out of opt in copy. This will *never* be accepted.
56 (removed, opt_out_copy, "1.0.0", None, None, None),
57 (removed, quad_precision_float, "1.0.0", None, None, None),
58 (removed, struct_inherit, "1.0.0", None, None, None),
59 (removed, test_removed_feature, "1.0.0", None, None, None),
60 (removed, visible_private_types, "1.0.0", None, None, None),
61 (removed, unsafe_no_drop_flag, "1.0.0", None, None, None),
62 /// Allows using items which are missing stability attributes
63 (removed, unmarked_api, "1.0.0", None, None, None),
64 (removed, allocator, "1.0.0", None, None, None),
65 (removed, simd, "1.0.0", Some(27731), None,
66 Some("removed in favor of `#[repr(simd)]`")),
67 (removed, advanced_slice_patterns, "1.0.0", Some(62254), None,
68 Some("merged into `#![feature(slice_patterns)]`")),
69 (removed, macro_reexport, "1.0.0", Some(29638), None,
70 Some("subsumed by `pub use`")),
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 features specific to OIBIT (now called auto traits).
75 /// Renamed to `auto_traits`.
76 (removed, optin_builtin_traits, "1.0.0", Some(13231), None,
77 Some("renamed to `auto_traits`")),
78 (removed, pushpop_unsafe, "1.2.0", None, None, None),
79 (removed, needs_allocator, "1.4.0", Some(27389), None,
80 Some("subsumed by `#![feature(allocator_internals)]`")),
81 /// Allows identifying crates that contain sanitizer runtimes.
82 (removed, sanitizer_runtime, "1.17.0", None, None, None),
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 (removed, proc_macro_mod, "1.27.0", Some(54727), None,
89 Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
90 (removed, proc_macro_expr, "1.27.0", Some(54727), None,
91 Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
92 (removed, proc_macro_non_items, "1.27.0", Some(54727), None,
93 Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
94 (removed, proc_macro_gen, "1.27.0", Some(54727), None,
95 Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
96 (removed, panic_implementation, "1.28.0", Some(44489), None,
97 Some("subsumed by `#[panic_handler]`")),
98 /// Allows the use of `#[derive(Anything)]` as sugar for `#[derive_Anything]`.
99 (removed, custom_derive, "1.32.0", Some(29644), None,
100 Some("subsumed by `#[proc_macro_derive]`")),
101 /// Paths of the form: `extern::foo::bar`
102 (removed, extern_in_paths, "1.33.0", Some(55600), None,
103 Some("subsumed by `::foo::bar` paths")),
104 (removed, quote, "1.33.0", Some(29601), None, None),
105 /// Allows `[x; N]` where `x` is a constant (RFC 2203).
106 (removed, const_in_array_repeat_expressions, "1.37.0", Some(49147), None,
107 Some("removed due to causing promotable bugs")),
108 /// Allows using `#[unsafe_destructor_blind_to_params]` (RFC 1238).
109 (removed, dropck_parametricity, "1.38.0", Some(28498), None, None),
110 (removed, await_macro, "1.38.0", Some(50547), None,
111 Some("subsumed by `.await` syntax")),
112 /// Allows defining `existential type`s.
113 (removed, existential_type, "1.38.0", Some(63063), None,
114 Some("removed in favor of `#![feature(min_type_alias_impl_trait)]`")),
115 /// Allows using the macros:
116 /// + `__diagnostic_used`
117 /// + `__register_diagnostic`
118 /// +`__build_diagnostic_array`
119 (removed, rustc_diagnostic_macros, "1.38.0", None, None, None),
120 /// Allows using `#[on_unimplemented(..)]` on traits.
121 /// (Moved to `rustc_attrs`.)
122 (removed, on_unimplemented, "1.40.0", None, None, None),
123 /// Allows overlapping impls of marker traits.
124 (removed, overlapping_marker_traits, "1.42.0", Some(29864), None,
125 Some("removed in favor of `#![feature(marker_trait_attr)]`")),
126 /// Allows `#[no_debug]`.
127 (removed, no_debug, "1.43.0", Some(29721), None, Some("removed due to lack of demand")),
128 /// Allows comparing raw pointers during const eval.
129 (removed, const_compare_raw_pointers, "1.46.0", Some(53020), None,
130 Some("cannot be allowed in const eval in any meaningful way")),
131 /// Allows using the `#[link_args]` attribute.
132 (removed, link_args, "1.53.0", Some(29596), None,
133 Some("removed in favor of using `-C link-arg=ARG` on command line, \
134 which is available from cargo build scripts with `cargo:rustc-link-arg` now")),
136 // -------------------------------------------------------------------------
137 // feature-group-end: removed features
138 // -------------------------------------------------------------------------
143 (stable_removed, no_stack_check, "1.0.0", None, None),