11//! List of the removed feature gates.
22
3+ use std:: num:: { NonZero , NonZeroU32 } ;
4+
35use rustc_span:: sym;
46
57use super :: { Feature , to_nonzero} ;
68
79pub struct RemovedFeature {
810 pub feature : Feature ,
911 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+ } ;
1022}
1123
1224macro_rules! declare_features {
1325 ( $(
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 ) ? ) ,
1527 ) +) => {
1628 /// Formerly unstable features that have now been removed.
1729 pub static REMOVED_LANG_FEATURES : & [ RemovedFeature ] = & [
@@ -21,7 +33,8 @@ macro_rules! declare_features {
2133 since: $ver,
2234 issue: to_nonzero( $issue) ,
2335 } ,
24- reason: $reason
36+ reason: $reason,
37+ pull: opt_nonzero_u32!( $( $pull) ?) ,
2538 } ) ,+
2639 ] ;
2740 } ;
@@ -120,7 +133,7 @@ declare_features! (
120133 Some ( "subsumed by `::foo::bar` paths" ) ) ,
121134 /// Allows `#[doc(include = "some-file")]`.
122135 ( 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 ) ,
124137 /// Allows using `#[ffi_returns_twice]` on foreign functions.
125138 ( removed, ffi_returns_twice, "1.78.0" , Some ( 58314 ) ,
126139 Some ( "being investigated by the ffi-unwind project group" ) ) ,
0 commit comments