about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-06-03 20:13:09 +0000
committerbors <bors@rust-lang.org>2018-06-03 20:13:09 +0000
commit29f48ccf396be031ee8a54e74a3a4e81866c8872 (patch)
tree2f33ba908db3f5cf869d2be0cb8e1bd98a683543 /src/libsyntax
parentbe5f17ccff09569c2dd22df9330364a92fec2295 (diff)
parent8ad15dea3f9ac9b0fcfad4a61a70aa47ecc4d938 (diff)
downloadrust-29f48ccf396be031ee8a54e74a3a4e81866c8872.tar.gz
rust-29f48ccf396be031ee8a54e74a3a4e81866c8872.zip
Auto merge of #50338 - japaric:panic-impl, r=alexcrichton
implement #[panic_implementation]

This implements the `#[panic_implementation]` attribute as instructed in https://github.com/rust-lang/rust/issues/44489#issuecomment-381324623

I haven't run the full test suite yet but at least all the compile-fail tests pass.

r? @nagisa
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 9b84713b0f9..7349745fefe 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -475,6 +475,9 @@ declare_features! (
 
     // 'a: { break 'a; }
     (active, label_break_value, "1.28.0", Some(48594), None),
+
+    // #[panic_implementation]
+    (active, panic_implementation, "1.28.0", Some(44489), None),
 );
 
 declare_features! (
@@ -1069,6 +1072,12 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
                                  "attribute is currently unstable",
                                  cfg_fn!(wasm_custom_section))),
 
+    // RFC 2070
+    ("panic_implementation", Normal, Gated(Stability::Unstable,
+                           "panic_implementation",
+                           "#[panic_implementation] is an unstable feature",
+                           cfg_fn!(panic_implementation))),
+
     // Crate level attributes
     ("crate_name", CrateLevel, Ungated),
     ("crate_type", CrateLevel, Ungated),