diff options
| author | bors <bors@rust-lang.org> | 2018-09-18 09:06:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-18 09:06:42 +0000 |
| commit | f004cae5360c4a3f365c7f7525b4293559201ce2 (patch) | |
| tree | a7b22fceebae88f7eceb23b669c63d88c4a37102 /src/libsyntax | |
| parent | 36c0ee97b9f888d576fe4302b0aad846b4446e6c (diff) | |
| parent | 85d214e7bdbb587878b2ff691eaba23611729511 (diff) | |
| download | rust-f004cae5360c4a3f365c7f7525b4293559201ce2.tar.gz rust-f004cae5360c4a3f365c7f7525b4293559201ce2.zip | |
Auto merge of #54319 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 9 pull requests Successful merges: - #53522 (Add doc for impl From for Addr) - #54097 (rustdoc: Remove namespace for keywords) - #54205 (Add treat-err-as-bug flag in rustdoc) - #54225 (Regression test for rust-lang/rust#53675.) - #54232 (add `-Z dont-buffer-diagnostics`) - #54273 (Suggest to change numeric literal instead of casting) - #54299 (Issue 54246) - #54311 (Remove README with now-out-of-date docs about docs.) - #54313 (OsStr: Document that it's not NUL terminated) Failed merges: r? @ghost
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 060faa9856d..67a9601fb12 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -711,7 +711,7 @@ pub enum AttributeGate { impl AttributeGate { fn is_deprecated(&self) -> bool { match *self { - Gated(Stability::Deprecated(_), ..) => true, + Gated(Stability::Deprecated(_, _), ..) => true, _ => false, } } @@ -720,8 +720,9 @@ impl AttributeGate { #[derive(Copy, Clone, Debug)] pub enum Stability { Unstable, - // Argument is tracking issue link. - Deprecated(&'static str), + // First argument is tracking issue link; second argument is an optional + // help message, which defaults to "remove this attribute" + Deprecated(&'static str, Option<&'static str>), } // fn() is not Debug @@ -1048,7 +1049,7 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG ("no_builtins", Whitelisted, Ungated), ("no_mangle", Whitelisted, Ungated), ("no_debug", Whitelisted, Gated( - Stability::Deprecated("https://github.com/rust-lang/rust/issues/29721"), + Stability::Deprecated("https://github.com/rust-lang/rust/issues/29721", None), "no_debug", "the `#[no_debug]` attribute was an experimental feature that has been \ deprecated due to lack of demand", @@ -1061,7 +1062,8 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG cfg_fn!(omit_gdb_pretty_printer_section))), ("unsafe_destructor_blind_to_params", Normal, - Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/34761"), + Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/34761", + Some("replace this attribute with `#[may_dangle]`")), "dropck_parametricity", "unsafe_destructor_blind_to_params has been replaced by \ may_dangle and will be removed in the future", @@ -1140,9 +1142,10 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG ("panic_implementation", Normal, Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/44489\ - #issuecomment-415140224"), + #issuecomment-415140224", + Some("replace this attribute with `#[panic_handler]`")), "panic_implementation", - "This attribute was renamed to `panic_handler`", + "this attribute was renamed to `panic_handler`", cfg_fn!(panic_implementation))), // RFC 2070 |
