]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_feature/src/removed.rs
New upstream version 1.53.0+dfsg1
[rustc.git] / compiler / rustc_feature / src / removed.rs
CommitLineData
e1599b0c
XL
1//! List of the removed feature gates.
2
1b1a35ee 3use super::{to_nonzero, Feature, State};
dfeec247 4use rustc_span::symbol::sym;
e1599b0c
XL
5
6macro_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,
1b1a35ee 17 issue: to_nonzero($issue),
e1599b0c
XL
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,
1b1a35ee 35 issue: to_nonzero($issue),
e1599b0c
XL
36 edition: None,
37 description: concat!($($doc,)*),
38 }
39 ),+
40 ];
41 };
42}
43
dfeec247 44#[rustfmt::skip]
e1599b0c
XL
45declare_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`")),
60c5eb7d
XL
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]`")),
fc512014
XL
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`")),
e1599b0c
XL
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)]`")),
dfeec247
XL
81 /// Allows identifying crates that contain sanitizer runtimes.
82 (removed, sanitizer_runtime, "1.17.0", None, None, None),
cdc7bbd5
XL
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`")),
e1599b0c
XL
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),
5869c6ff
XL
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")),
e1599b0c
XL
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,
6a06907d 114 Some("removed in favor of `#![feature(min_type_alias_impl_trait)]`")),
e1599b0c
XL
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),
60c5eb7d
XL
120 /// Allows using `#[on_unimplemented(..)]` on traits.
121 /// (Moved to `rustc_attrs`.)
122 (removed, on_unimplemented, "1.40.0", None, None, None),
74b04a01
XL
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")),
f035d41b
XL
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")),
cdc7bbd5
XL
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")),
135 /// Allows using `#[main]` to replace the entrypoint `#[lang = "start"]` calls.
136 (removed, main, "1.53.0", Some(29634), None, None),
137 (removed, pub_macro_rules, "1.53.0", Some(78855), None,
138 Some("removed due to being incomplete, in particular it does not work across crates")),
f035d41b 139
e1599b0c
XL
140 // -------------------------------------------------------------------------
141 // feature-group-end: removed features
142 // -------------------------------------------------------------------------
143);
144
dfeec247 145#[rustfmt::skip]
e1599b0c
XL
146declare_features! (
147 (stable_removed, no_stack_check, "1.0.0", None, None),
148);