about summary refs log tree commit diff
path: root/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs')
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs
new file mode 100644
index 00000000000..16f7276398e
--- /dev/null
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-non-root-main.rs
@@ -0,0 +1,8 @@
+#![feature(unix_sigpipe)]
+
+mod m {
+    #[unix_sigpipe = "inherit"] //~ error: `unix_sigpipe` attribute can only be used on root `fn main()`
+    fn main() {}
+}
+
+fn main() {}