@@ -711,7 +711,7 @@ pub enum AttributeGate {
711711impl AttributeGate {
712712 fn is_deprecated ( & self ) -> bool {
713713 match * self {
714- Gated ( Stability :: Deprecated ( _) , ..) => true ,
714+ Gated ( Stability :: Deprecated ( _, _ ) , ..) => true ,
715715 _ => false ,
716716 }
717717 }
@@ -720,8 +720,9 @@ impl AttributeGate {
720720#[ derive( Copy , Clone , Debug ) ]
721721pub enum Stability {
722722 Unstable ,
723- // Argument is tracking issue link.
724- Deprecated ( & ' static str ) ,
723+ // First argument is tracking issue link; second argument is an optional
724+ // help message, which defaults to "remove this attribute"
725+ Deprecated ( & ' static str , Option < & ' static str > ) ,
725726}
726727
727728// fn() is not Debug
@@ -1044,7 +1045,7 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
10441045 ( "no_builtins" , Whitelisted , Ungated ) ,
10451046 ( "no_mangle" , Whitelisted , Ungated ) ,
10461047 ( "no_debug" , Whitelisted , Gated (
1047- Stability :: Deprecated ( "https://github.com/rust-lang/rust/issues/29721" ) ,
1048+ Stability :: Deprecated ( "https://github.com/rust-lang/rust/issues/29721" , None ) ,
10481049 "no_debug" ,
10491050 "the `#[no_debug]` attribute was an experimental feature that has been \
10501051 deprecated due to lack of demand",
@@ -1057,7 +1058,8 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
10571058 cfg_fn ! ( omit_gdb_pretty_printer_section) ) ) ,
10581059 ( "unsafe_destructor_blind_to_params" ,
10591060 Normal ,
1060- Gated ( Stability :: Deprecated ( "https://github.com/rust-lang/rust/issues/34761" ) ,
1061+ Gated ( Stability :: Deprecated ( "https://github.com/rust-lang/rust/issues/34761" ,
1062+ Some ( "replace this attribute with `#[may_dangle]`" ) ) ,
10611063 "dropck_parametricity" ,
10621064 "unsafe_destructor_blind_to_params has been replaced by \
10631065 may_dangle and will be removed in the future",
@@ -1136,7 +1138,8 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
11361138 ( "panic_implementation" ,
11371139 Normal ,
11381140 Gated ( Stability :: Deprecated ( "https://github.com/rust-lang/rust/issues/44489\
1139- #issuecomment-415140224") ,
1141+ #issuecomment-415140224",
1142+ Some ( "replace this attribute with `#[panic_handler]`" ) ) ,
11401143 "panic_implementation" ,
11411144 "this attribute was renamed to `panic_handler`" ,
11421145 cfg_fn ! ( panic_implementation) ) ) ,
0 commit comments