summaryrefslogtreecommitdiffstats
path: root/third_party/rust/new_debug_unreachable/tests/check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/new_debug_unreachable/tests/check.rs')
-rw-r--r--third_party/rust/new_debug_unreachable/tests/check.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/third_party/rust/new_debug_unreachable/tests/check.rs b/third_party/rust/new_debug_unreachable/tests/check.rs
new file mode 100644
index 0000000000..f47ee2da50
--- /dev/null
+++ b/third_party/rust/new_debug_unreachable/tests/check.rs
@@ -0,0 +1,9 @@
+#[macro_use]
+extern crate debug_unreachable;
+
+#[test]
+#[should_panic]
+fn explodes_in_debug() {
+ unsafe { debug_unreachable!() }
+}
+