about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2018-08-23 00:40:32 +0200
committerJorge Aparicio <jorge@japaric.io>2018-08-23 20:58:55 +0200
commita774c81f9855f75a1a86f71a851b373d2178d9e9 (patch)
treeec4d2488935d22b9a2b07b36e9c27296df120ee5 /src/libsyntax
parente5284b0b57275cb18618ef1532ee7f07c32a1e18 (diff)
downloadrust-a774c81f9855f75a1a86f71a851b373d2178d9e9.tar.gz
rust-a774c81f9855f75a1a86f71a851b373d2178d9e9.zip
add #[panic_handler]; deprecate #[panic_implementation]
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 1ffb6e55f06..04066f687fc 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -472,8 +472,9 @@ declare_features! (
     // Integer match exhaustiveness checking
     (active, exhaustive_integer_patterns, "1.30.0", Some(50907), None),
 
-    // #[panic_implementation]
+    // RFC 2070: #[panic_implementation] / #[panic_handler]
     (active, panic_implementation, "1.28.0", Some(44489), None),
+    (active, panic_handler, "1.30.0", Some(44489), None),
 
     // #[doc(keyword = "...")]
     (active, doc_keyword, "1.28.0", Some(51315), None),
@@ -1104,11 +1105,18 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
                                    "infer 'static lifetime requirements",
                                    cfg_fn!(infer_static_outlives_requirements))),
 
+    // RFC 2070 (deprecated attribute name)
+    ("panic_implementation",
+     Normal, Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/44489#issuecomment-415140224"),
+                   "panic_implementation",
+                   "This attribute was renamed to `panic_handler`",
+                   cfg_fn!(panic_implementation))),
+
     // RFC 2070
-    ("panic_implementation", Normal, Gated(Stability::Unstable,
-                           "panic_implementation",
-                           "#[panic_implementation] is an unstable feature",
-                           cfg_fn!(panic_implementation))),
+    ("panic_handler", Normal, Gated(Stability::Unstable,
+                                    "panic_handler",
+                                    "#[panic_handler] is an unstable feature",
+                                    cfg_fn!(panic_handler))),
 
     ("alloc_error_handler", Normal, Gated(Stability::Unstable,
                            "alloc_error_handler",