1
1
//! List of the removed feature gates.
2
2
3
+ use std:: num:: { NonZero , NonZeroU32 } ;
4
+
3
5
use rustc_span:: sym;
4
6
5
7
use super :: { Feature , to_nonzero} ;
6
8
7
9
pub struct RemovedFeature {
8
10
pub feature : Feature ,
9
11
pub reason : Option < & ' static str > ,
12
+ pub pull : Option < NonZero < u32 > > ,
13
+ }
14
+
15
+ macro_rules! opt_nonzero_u32 {
16
+ ( ) => {
17
+ None
18
+ } ;
19
+ ( $val: expr) => {
20
+ Some ( NonZeroU32 :: new( $val) . unwrap( ) )
21
+ } ;
10
22
}
11
23
12
24
macro_rules! declare_features {
13
25
( $(
14
- $( #[ doc = $doc: tt] ) * ( removed, $feature: ident, $ver: expr, $issue: expr, $reason: expr) ,
26
+ $( #[ doc = $doc: tt] ) * ( removed, $feature: ident, $ver: expr, $issue: expr, $reason: expr $ ( , $pull : expr ) ? ) ,
15
27
) +) => {
16
28
/// Formerly unstable features that have now been removed.
17
29
pub static REMOVED_LANG_FEATURES : & [ RemovedFeature ] = & [
@@ -21,7 +33,8 @@ macro_rules! declare_features {
21
33
since: $ver,
22
34
issue: to_nonzero( $issue) ,
23
35
} ,
24
- reason: $reason
36
+ reason: $reason,
37
+ pull: opt_nonzero_u32!( $( $pull) ?) ,
25
38
} ) ,+
26
39
] ;
27
40
} ;
@@ -120,7 +133,7 @@ declare_features! (
120
133
Some ( "subsumed by `::foo::bar` paths" ) ) ,
121
134
/// Allows `#[doc(include = "some-file")]`.
122
135
( removed, external_doc, "1.54.0" , Some ( 44732 ) ,
123
- Some ( "use #[doc = include_str!(\" filename\" )] instead, which handles macro invocations" ) ) ,
136
+ Some ( "use #[doc = include_str!(\" filename\" )] instead, which handles macro invocations" ) , 85457 ) ,
124
137
/// Allows using `#[ffi_returns_twice]` on foreign functions.
125
138
( removed, ffi_returns_twice, "1.78.0" , Some ( 58314 ) ,
126
139
Some ( "being investigated by the ffi-unwind project group" ) ) ,
0 commit comments