summaryrefslogtreecommitdiffstats
path: root/third_party/rust/tokio/tests/signal_no_rt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/tokio/tests/signal_no_rt.rs')
-rw-r--r--third_party/rust/tokio/tests/signal_no_rt.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/third_party/rust/tokio/tests/signal_no_rt.rs b/third_party/rust/tokio/tests/signal_no_rt.rs
new file mode 100644
index 0000000000..b0f32b2d10
--- /dev/null
+++ b/third_party/rust/tokio/tests/signal_no_rt.rs
@@ -0,0 +1,11 @@
+#![warn(rust_2018_idioms)]
+#![cfg(feature = "full")]
+#![cfg(unix)]
+
+use tokio::signal::unix::{signal, SignalKind};
+
+#[test]
+#[should_panic]
+fn no_runtime_panics_creating_signals() {
+ let _ = signal(SignalKind::hangup());
+}