]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_feature/src/removed.rs
Merge commit 'c1664c50b27a51f7a78c93ba65558e7c33eabee6' into clippyup
[rust.git] / compiler / rustc_feature / src / removed.rs
1 //! List of the removed feature gates.
2
3 use super::{to_nonzero, Feature, State};
4 use rustc_span::symbol::sym;
5
6 macro_rules! declare_features {
7     ($(
8         $(#[doc = $doc:tt])* (removed, $feature:ident, $ver:expr, $issue:expr, None, $reason:expr),
9     )+) => {
10         /// Represents unstable features which have since been removed (it was once Active)
11         pub const REMOVED_FEATURES: &[Feature] = &[
12             $(
13                 Feature {
14                     state: State::Removed { reason: $reason },
15                     name: sym::$feature,
16                     since: $ver,
17                     issue: to_nonzero($issue),
18                     edition: None,
19                     description: concat!($($doc,)*),
20                 }
21             ),+
22         ];
23     };
24
25     ($(
26         $(#[doc = $doc:tt])* (stable_removed, $feature:ident, $ver:expr, $issue:expr, None),
27     )+) => {
28         /// Represents stable features which have since been removed (it was once Accepted)
29         pub const STABLE_REMOVED_FEATURES: &[Feature] = &[
30             $(
31                 Feature {
32                     state: State::Stabilized { reason: None },
33                     name: sym::$feature,
34                     since: $ver,
35                     issue: to_nonzero($issue),
36                     edition: None,
37                     description: concat!($($doc,)*),
38                 }
39             ),+
40         ];
41     };
42 }
43
44 #[rustfmt::skip]
45 declare_features! (
46     // -------------------------------------------------------------------------
47     // feature-group-start: removed features
48     // -------------------------------------------------------------------------
49
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     (removed, proc_macro_mod, "1.27.0", Some(54727), None,
84      Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
85     (removed, proc_macro_expr, "1.27.0", Some(54727), None,
86      Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
87     (removed, proc_macro_non_items, "1.27.0", Some(54727), None,
88      Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
89     (removed, proc_macro_gen, "1.27.0", Some(54727), None,
90      Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
91     (removed, panic_implementation, "1.28.0", Some(44489), None,
92      Some("subsumed by `#[panic_handler]`")),
93     /// Allows the use of `#[derive(Anything)]` as sugar for `#[derive_Anything]`.
94     (removed, custom_derive, "1.32.0", Some(29644), None,
95      Some("subsumed by `#[proc_macro_derive]`")),
96     /// Paths of the form: `extern::foo::bar`
97     (removed, extern_in_paths, "1.33.0", Some(55600), None,
98      Some("subsumed by `::foo::bar` paths")),
99     (removed, quote, "1.33.0", Some(29601), None, None),
100     /// Allows using `#[unsafe_destructor_blind_to_params]` (RFC 1238).
101     (removed, dropck_parametricity, "1.38.0", Some(28498), None, None),
102     (removed, await_macro, "1.38.0", Some(50547), None,
103      Some("subsumed by `.await` syntax")),
104     /// Allows defining `existential type`s.
105     (removed, existential_type, "1.38.0", Some(63063), None,
106      Some("removed in favor of `#![feature(type_alias_impl_trait)]`")),
107     /// Allows using the macros:
108     /// + `__diagnostic_used`
109     /// + `__register_diagnostic`
110     /// +`__build_diagnostic_array`
111     (removed, rustc_diagnostic_macros, "1.38.0", None, None, None),
112     /// Allows using `#[on_unimplemented(..)]` on traits.
113     /// (Moved to `rustc_attrs`.)
114     (removed, on_unimplemented, "1.40.0", None, None, None),
115     /// Allows overlapping impls of marker traits.
116     (removed, overlapping_marker_traits, "1.42.0", Some(29864), None,
117      Some("removed in favor of `#![feature(marker_trait_attr)]`")),
118     /// Allows `#[no_debug]`.
119     (removed, no_debug, "1.43.0", Some(29721), None, Some("removed due to lack of demand")),
120     /// Allows comparing raw pointers during const eval.
121     (removed, const_compare_raw_pointers, "1.46.0", Some(53020), None,
122      Some("cannot be allowed in const eval in any meaningful way")),
123
124     // -------------------------------------------------------------------------
125     // feature-group-end: removed features
126     // -------------------------------------------------------------------------
127 );
128
129 #[rustfmt::skip]
130 declare_features! (
131     (stable_removed, no_stack_check, "1.0.0", None, None),
132 );